@Test public void testRemoveAll() throws Exception { cache.put("k1", "v1"); cache.put("k2", "v2"); assertThat(cache.get("k1"), is(Optional.of("v1"))); assertThat(cache.get("k2"), is(Optional.of("v2"))); cache.removeAll(); assertThat(cache.get("k1"), is(Optional.empty())); assertThat(cache.get("k2"), is(Optional.empty())); }