CacheEntry { public boolean isExpired() { return System.nanoTime() > createTimestamp.get() + TimeUnit.MILLISECONDS.toNanos( ttlMs ); } CacheEntry( V value, long ttlMs ); V getValue(); boolean isExpired();  }
@Test public void testIsExpired() throws Exception { cacheEntry.isExpired(); }