EhCacheDataCache dataCache = new EhCacheDataCache();
DataCacheKey key = new DataCacheKey();
key.addAttribute("Test", "test");
dataCache.put(key, new DefaultTableModel());
final CacheManager cacheManager = CacheManager.getInstance();
// Note: EHCacheProvider will dynamically create these
// caches if they don't exist.
cacheManager.clearAll();
cacheManager.removalAll();
assertFalse(cacheManager.cacheExists("libloader-bundles"));
assertFalse(cacheManager.cacheExists("libloader-data"));
assertFalse(cacheManager.cacheExists("libloader-factory"));
assertFalse(cacheManager.cacheExists("report-dataset-cache"));
cacheManager.shutdown();
assertNull(dataCache.get(key));
dataCache.put(key, new DefaultTableModel());
assertNotNull(dataCache.get(key));