@Test public void should_reinit_token_expiration_date() { Account account = new Account().setOauthId("anOAUTHID"); tokenService.reinitTokenValidity(account); assertThat(account.getTokenExpiration()).isNotNull().isAfter(LocalDateTime.now().minus(Duration.ofDays(3))); }
public void reinitTokenValidity(Account account) { Objects.requireNonNull(account); account.setTokenExpiration(LocalDateTime.now().plus(Duration.ofHours(3))); }
TokenService { public void reinitTokenValidity(Account account) { Objects.requireNonNull(account); account.setTokenExpiration(LocalDateTime.now().plus(Duration.ofHours(3))); } }
TokenService { public void reinitTokenValidity(Account account) { Objects.requireNonNull(account); account.setTokenExpiration(LocalDateTime.now().plus(Duration.ofHours(3))); }  }
TokenService { public void reinitTokenValidity(Account account) { Objects.requireNonNull(account); account.setTokenExpiration(LocalDateTime.now().plus(Duration.ofHours(3))); }  void generateNewToken(Account account); void reinitTokenValidity(Account account); Account checkToken(String token); Account getCredentialsForToken(String token); Member tryToLinkWithActualMember(Account account); }
TokenService { public void reinitTokenValidity(Account account) { Objects.requireNonNull(account); account.setTokenExpiration(LocalDateTime.now().plus(Duration.ofHours(3))); }  void generateNewToken(Account account); void reinitTokenValidity(Account account); Account checkToken(String token); Account getCredentialsForToken(String token); Member tryToLinkWithActualMember(Account account);  }