### Question:
Cache { public Collection<V> clear() { final Collection<V> removedItems = itemMap.values(); keyList.clear(); itemMap = new ConcurrentHashMap<>(capacity); return removedItems; } Cache(int capacity); V add(K key, V item); boolean contains(K key); V get(K key); Collection<V> clear(); V remove(K key);  }### Answer:
@Test public void testClear() { cache.add(25, 25.0); cache.add(26, 26.0); assertTrue(cache.contains(25)); assertTrue(cache.contains(26)); cache.clear(); assertFalse(cache.contains(25)); assertFalse(cache.contains(26)); }