136137138139140141142143144145146
} public void testClear() throws CacheAcquireException { Cache cache = initialize(); cache.clear(); assertFalse(cache.containsKey("first key")); assertFalse(cache.containsKey("second key")); assertFalse(cache.containsKey("third key")); assertFalse(cache.containsKey("fourth key"));
149150151152153154155156157158159
public void testSize() throws CacheAcquireException { Cache cache = initialize(); assertEquals(3, cache.size()); cache.clear(); assertEquals(0, cache.size()); } public void testIsEmpty() throws CacheAcquireException { Cache cache = initialize();
157158159160161162163164165166167
public void testIsEmpty() throws CacheAcquireException { Cache cache = initialize(); assertFalse(cache.isEmpty()); cache.clear(); assertTrue(cache.isEmpty()); } public void testGet() throws CacheAcquireException { Cache cache = initialize();
7071727374757677787980
map.put("second key", "second value"); map.put("third key", "third value"); cache.putAll(map); assertEquals(0, cache.size()); cache.clear(); assertEquals(0, cache.size()); Set keys = cache.keySet(); assertEquals(0, keys.size());
154155156157158159160161162163164
} public void testClear() { Cache cache = initialize(); cache.clear(); assertFalse(cache.containsKey("first key")); assertFalse(cache.containsKey("second key")); assertFalse(cache.containsKey("third key")); assertFalse(cache.containsKey("fourth key"));
167168169170171172173174175176177
public void testSize() { Cache cache = initialize(); assertEquals(3, cache.size()); cache.clear(); assertEquals(0, cache.size()); } public void testIsEmpty() { Cache cache = initialize();
175176177178179180181182183184185
public void testIsEmpty() { Cache cache = initialize(); assertFalse(cache.isEmpty()); cache.clear(); assertTrue(cache.isEmpty()); } public void testGet() { Cache cache = initialize();