// --------------clear cache
fifoCache.clearCache();
assertEquals("now, expect cache is clear", 0, fifoCache.getCacheSize());
assertEquals("now, expect number of object in cache is:", 0, fifoCache.getCachedObjects().size());
/* --------------test cache service with add extenal component plugin------ */
ExoCache simpleCachePlugin = service_.getCacheInstance("simpleCachePlugin");
assertTrue("expect found simpleCache from extenal plugin", simpleCachePlugin instanceof SimpleExoCache);
assertEquals("expect 'maxsize' of this cache is", 8, simpleCachePlugin.getMaxSize());
assertEquals("expect 'LiveTime' of this cache is", 5, simpleCachePlugin.getLiveTime());
ExoCache fifoCachePlugin = service_.getCacheInstance("fifoCachePlugin");
assertTrue("expect found fifoCache from extenal plugin", fifoCachePlugin instanceof FIFOExoCache);
assertEquals("expect 'maxsize' of this cache is", 6, fifoCachePlugin.getMaxSize());
assertEquals("expect 'LiveTime' of this cache is", 10, fifoCachePlugin.getLiveTime());
// ----all cache instances---
Collection<ExoCache<? extends Serializable, ?>> caches = service_.getAllCacheInstances();
assertEquals("expect number of cache instanse is ", size + 7, caches.size());
hasObjectInCollection(nocache, caches, new ExoCacheComparator());
hasObjectInCollection(cacheLiveTime2s, caches, new ExoCacheComparator());