public void testSize() { Cache<String, String> cache = initialize(); assertEquals(3, cache.size()); cache.clear(); assertEquals(0, cache.size()); }
public void testIsEmpty() { Cache<String, String> cache = initialize(); assertFalse(cache.isEmpty()); cache.clear(); assertTrue(cache.isEmpty()); }
public void testClear() { Cache<String, String> cache = initialize(); cache.clear(); assertFalse(cache.containsKey("first key")); assertFalse(cache.containsKey("second key")); assertFalse(cache.containsKey("third key")); assertFalse(cache.containsKey("fourth key")); assertFalse(cache.containsKey("fifth key")); }