/** Load up the test cache */
 protected void setUp() throws Exception {
   super.setUp();
   manager = new CacheManager();
   cache = manager.getCache("sampleIdlingExpiringCache");
   selfPopulatingCache = new SelfPopulatingCache(cache, new CountingCacheEntryFactory("value"));
   cacheEntryFactoryRequests = 0;
 }
 /** teardown */
 @Override
 @After
 public void tearDown() throws Exception {
   if (selfPopulatingCache != null) {
     selfPopulatingCache.removeAll();
   }
   if (manager != null) {
     manager.shutdown();
   }
   super.tearDown();
 }
 /** Load up the test cache */
 @Override
 @Before
 public void setUp() throws Exception {
   // Skip update checks. Causing an OutOfMemoryError
   System.setProperty("net.sf.ehcache.skipUpdateCheck", "true");
   super.setUp();
   manager = new CacheManager();
   cache = manager.getCache("sampleIdlingExpiringCache");
   selfPopulatingCache = new SelfPopulatingCache(cache, new CountingCacheEntryFactory("value"));
   cacheEntryFactoryRequests = 0;
 }
 /** teardown */
 protected void tearDown() throws Exception {
   selfPopulatingCache.removeAll();
   manager.shutdown();
   super.tearDown();
 }