TimeBasedExpiringValueMap { public void clear() { map.clear(); } TimeBasedExpiringValueMap(TimeService timeService);  TimeBasedExpiringValueMap(TimeService timeService, long timeoutMilliseconds); void put(K key, V value); V get(K key); V remove(K key); int size(); void clear(); static final long DEFALT_TIMEOUT; }
@Test public void clear() { map.put(key1, value1); assertNotNull(map.get(key1)); assertEquals(1, map.size()); map.clear(); assertNull(map.get(key1)); assertEquals(0, map.size()); }