@Test void testIsExpiredNoExpirationDate() { assertFalse(token.isExpired()); }
public boolean isExpired() { Optional<Instant> expirationDate = getExpirationDate(); return expirationDate.isPresent() && expirationDate.get().isBefore(now()); }
Token extends StaticEntity { public boolean isExpired() { Optional<Instant> expirationDate = getExpirationDate(); return expirationDate.isPresent() && expirationDate.get().isBefore(now()); } }
Token extends StaticEntity { public boolean isExpired() { Optional<Instant> expirationDate = getExpirationDate(); return expirationDate.isPresent() && expirationDate.get().isBefore(now()); } Token(Entity entity);  Token(EntityType entityType);  Token(String id, EntityType entityType); }
Token extends StaticEntity { public boolean isExpired() { Optional<Instant> expirationDate = getExpirationDate(); return expirationDate.isPresent() && expirationDate.get().isBefore(now()); } Token(Entity entity);  Token(EntityType entityType);  Token(String id, EntityType entityType); String getId(); void setId(String id); User getUser(); void setUser(User user); String getToken(); void setToken(String token); Optional<Instant> getExpirationDate(); void setExpirationDate(Instant expirationDate); Instant getCreationDate(); void setCreationDate(Instant creationDate); @Nullable @CheckForNull String getDescription(); void setDescription(String description); boolean isExpired(); }
Token extends StaticEntity { public boolean isExpired() { Optional<Instant> expirationDate = getExpirationDate(); return expirationDate.isPresent() && expirationDate.get().isBefore(now()); } Token(Entity entity);  Token(EntityType entityType);  Token(String id, EntityType entityType); String getId(); void setId(String id); User getUser(); void setUser(User user); String getToken(); void setToken(String token); Optional<Instant> getExpirationDate(); void setExpirationDate(Instant expirationDate); Instant getCreationDate(); void setCreationDate(Instant creationDate); @Nullable @CheckForNull String getDescription(); void setDescription(String description); boolean isExpired();  }