### Question:
TimeLimitedBase { public boolean isExpired() { return now().isAfter(getExpireInstant()); } TimeLimitedBase(boolean renewable, long leaseDurationSecs);  TimeLimitedBase(TimeLimitedBase other); boolean isExpired(); boolean shouldExtend(Duration gracePeriod); Instant getExpireInstant(); Date getExpiredDate(); boolean expiresSoon(Duration gracePeriod); String info(); void leaseDurationSanityCheck(String nickname, Duration gracePeriod); public boolean renewable; public long leaseDurationSecs; }### Answer:
@Test public void isExpired() { assertFalse(newTimeLimitedBase(true, 1, EPOCH, EPOCH.plusMillis(1000)).isExpired()); assertTrue(newTimeLimitedBase(true, 1, EPOCH, EPOCH.plusMillis(2001)).isExpired()); }