@Test public void testExpiry() throws Exception { cache.put(1, "apple"); assertEquals("apple", cache.get(1)); assertFalse(cache.isEmpty()); Clock.setTime(3000); assertNull(cache.get(1)); assertTrue(cache.isEmpty()); }