public void testResetCache() throws Exception {
CacheAccessFactory factory = CacheAccessFactory.getInstance();
CacheAttributes catt = CacheAttributes.getDefaultCacheAttributes();
catt.setLocal();
catt.setCleanInterval(1);
Cache cache = factory.getCache(false);
//
cache.init(catt);
// CacheSweeper.startSweeper executes
// within CacheSweeper.getInstance
//
CacheSweeper instance = CacheSweeper.getInstance();
cache.close();
// CacheSweeper.stopSweeper executes
//
cache = factory.getCache(false);
//
cache.init(catt);
CacheSweeper instance2= CacheSweeper.getInstance();
assertNotSame(instance, instance2);
// CacheSweeper.startSweeper does not
// execute within CacheSweeper.getInstance
// because CacheSweeper instance is not null