### Question:
TimeLimitedBase { public boolean expiresSoon(Duration gracePeriod) { return leaseDurationSecs < gracePeriod.getSeconds(); } 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 expiresSoon() { assertFalse(newTimeLimitedBase(true, 80, EPOCH, EPOCH.plusSeconds(60)).expiresSoon(ofSeconds(10)), "lease duration > grace period"); assertTrue(newTimeLimitedBase(true, 9, EPOCH, EPOCH.plusSeconds(60)).expiresSoon(ofSeconds(10)), "lease duration < grace period"); }