Ejemplo n.º 1
0
 public void testClearCache() throws Exception {
   cache.put(new MyKey("a"), "a");
   cache.put(new MyKey("b"), "b");
   cache.put(new MyKey("c"), "c");
   assertEquals("a", cache.get(new MyKey("a")));
   assertTrue(cache.getCacheSize() > 0);
   assertEquals(0, listener.clearCache);
   cache.clearCache();
   assertEquals(1, listener.clearCache);
   assertTrue(cache.getCacheSize() == 0);
   assertNull(cache.get(new MyKey("a")));
 }
Ejemplo n.º 2
0
 protected void tearDown() throws Exception {
   cache.clearCache();
 }