ZonkyApiTokenImpl implements ZonkyApiToken { @Override public OffsetDateTime getObtainedOn() { return obtainedOn; } ZonkyApiTokenImpl();  ZonkyApiTokenImpl(final String accessToken, final String refreshToken, final OffsetDateTime obtainedOn);  ZonkyApiTokenImpl(final String accessToken, final String refreshToken, final int expiresIn);  ZonkyApiTokenImpl(final String accessToken, final String refreshToken, final int expiresIn,
            final OffsetDateTime obtainedOn);  ZonkyApiTokenImpl(final String accessToken, final String refreshToken, final int expiresIn,
            final OffsetDateTime obtainedOn, final String type); static ZonkyApiToken unmarshal(final String token); static String marshal(final ZonkyApiToken token); @Override long getId(); @Override char[] getAccessToken(); @Override char[] getRefreshToken(); @Override String getType(); @Override int getExpiresIn(); @Override boolean isExpired(); @Override String getScope(); @Override OffsetDateTime getObtainedOn(); @Override OffsetDateTime getExpiresOn(); @Override boolean willExpireIn(final TemporalAmount temporalAmount); void setAccessToken(final char[] accessToken); void setRefreshToken(final char[] refreshToken); void setType(final String type); void setScope(final String scope); void setExpiresIn(final int expiresIn); void setObtainedOn(final OffsetDateTime obtainedOn); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); static final String REFRESH_TOKEN_STRING; }
@Test void fresh() { final ZonkyApiToken token = new ZonkyApiTokenImpl(); assertThat(token.getObtainedOn()).isBeforeOrEqualTo(OffsetDateTime.now()); }