@Test public void tokenWithExpirationInTheFuture_isNotExpired() { AbstractToken doesNotExpireSoon = new MockTokenBuilder().withExpiration(MockTokenBuilder.NO_EXPIRE_DATE) .build(); when(doesNotExpireSoon.isExpired()).thenCallRealMethod(); assertThat(doesNotExpireSoon.isExpired()).isFalse(); }
@Override public boolean isExpired() { return getExpiration() == null ? true : getExpiration().isBefore(LocalDateTime.now().toInstant(ZoneOffset.UTC)); }
AbstractToken implements Token { @Override public boolean isExpired() { return getExpiration() == null ? true : getExpiration().isBefore(LocalDateTime.now().toInstant(ZoneOffset.UTC)); } }
AbstractToken implements Token { @Override public boolean isExpired() { return getExpiration() == null ? true : getExpiration().isBefore(LocalDateTime.now().toInstant(ZoneOffset.UTC)); } AbstractToken(@Nonnull DecodedJwt decodedJwt);  AbstractToken(@Nonnull String jwtToken); }
AbstractToken implements Token { @Override public boolean isExpired() { return getExpiration() == null ? true : getExpiration().isBefore(LocalDateTime.now().toInstant(ZoneOffset.UTC)); } AbstractToken(@Nonnull DecodedJwt decodedJwt);  AbstractToken(@Nonnull String jwtToken); @Nullable @Override String getHeaderParameterAsString(@Nonnull String headerName); @Override boolean hasClaim(@Nonnull String claimName); @Override boolean hasHeaderParameter(@Nonnull String parameterName); @Nullable @Override String getClaimAsString(@Nonnull String claimName); @Nullable @Override List<String> getClaimAsStringList(@Nonnull String claimName); @Nullable @Override JsonObject getClaimAsJsonObject(String claimName); @Nullable @Override Instant getExpiration(); @Override boolean isExpired(); @Nullable @Override Instant getNotBefore(); @Override String getTokenValue(); @Override Set<String> getAudiences(); @Override boolean equals(Object o); @Override int hashCode(); @Override String getZoneId(); @Override String toString(); }
AbstractToken implements Token { @Override public boolean isExpired() { return getExpiration() == null ? true : getExpiration().isBefore(LocalDateTime.now().toInstant(ZoneOffset.UTC)); } AbstractToken(@Nonnull DecodedJwt decodedJwt);  AbstractToken(@Nonnull String jwtToken); @Nullable @Override String getHeaderParameterAsString(@Nonnull String headerName); @Override boolean hasClaim(@Nonnull String claimName); @Override boolean hasHeaderParameter(@Nonnull String parameterName); @Nullable @Override String getClaimAsString(@Nonnull String claimName); @Nullable @Override List<String> getClaimAsStringList(@Nonnull String claimName); @Nullable @Override JsonObject getClaimAsJsonObject(String claimName); @Nullable @Override Instant getExpiration(); @Override boolean isExpired(); @Nullable @Override Instant getNotBefore(); @Override String getTokenValue(); @Override Set<String> getAudiences(); @Override boolean equals(Object o); @Override int hashCode(); @Override String getZoneId(); @Override String toString();  }