@Test public void testExpired() throws Exception { CacheEntry<Double> entry = new CacheEntry<>(1.0d, 1); await().atLeastMs(2); boolean isExpired = entry.expired(); assertThat("Cache entry should have expired already", isExpired, is(true)); }
public boolean expired() { return System.currentTimeMillis() >= expiresAt; }
CacheEntry { public boolean expired() { return System.currentTimeMillis() >= expiresAt; } }
CacheEntry { public boolean expired() { return System.currentTimeMillis() >= expiresAt; } CacheEntry(T value, long expireMillis); }
CacheEntry { public boolean expired() { return System.currentTimeMillis() >= expiresAt; } CacheEntry(T value, long expireMillis); T value(); boolean expired(); }
CacheEntry { public boolean expired() { return System.currentTimeMillis() >= expiresAt; } CacheEntry(T value, long expireMillis); T value(); boolean expired();  }