### Question:
TokenExpirationInfoBO { public boolean isExpired() { return expiration.isBefore(Instant.now()); } TokenExpirationInfoBO();  TokenExpirationInfoBO(long issuedAt, long expiration); Duration getTokenExpirationDuration(); Duration getTokenLifetimeDuration(); boolean isDurationPassed(Duration duration); boolean isDurationPassed(Duration duration, Instant comparing); boolean isExpired(); boolean isPartLifetimePassed(double part); Instant getIssuedAt(); void setIssuedAt(Instant issuedAt); Instant getExpiration(); void setExpiration(Instant expiration); @Override String toString();  }### Answer:
@Test void isNotExpired() { Instant now = Instant.now(); long issueToken = now.minusSeconds(150).toEpochMilli() / 1000; long expiration = now.plusSeconds(150).toEpochMilli() /1000; TokenExpirationInfoBO token = new TokenExpirationInfoBO(issueToken, expiration); assertThat(token.isExpired(), is(false)); }
@Test void isExpired() { Instant now = Instant.now(); long issueToken = now.minusSeconds(350).toEpochMilli() / 1000; long expiration = now.minusSeconds(50).toEpochMilli() /1000; TokenExpirationInfoBO token = new TokenExpirationInfoBO(issueToken, expiration); assertThat(token.isExpired(), is(true)); }