@Test public void removesTheExpiredPasswordToken() throws Exception { given(repository.deleteByExpiresLessThan(any())).willReturn(1L); Long numDeleted = underTest.removeExpiredTokens(); assertThat(numDeleted, is(1L)); }
@Transactional public Long removeExpiredTokens() { return tokenRepository.deleteByExpiresLessThan(now()); }
RemoveExpiredPasswordResetTokensService { @Transactional public Long removeExpiredTokens() { return tokenRepository.deleteByExpiresLessThan(now()); } }
RemoveExpiredPasswordResetTokensService { @Transactional public Long removeExpiredTokens() { return tokenRepository.deleteByExpiresLessThan(now()); } @Autowired  RemoveExpiredPasswordResetTokensService(PasswordResetTokenRepository tokenRepository); }
RemoveExpiredPasswordResetTokensService { @Transactional public Long removeExpiredTokens() { return tokenRepository.deleteByExpiresLessThan(now()); } @Autowired  RemoveExpiredPasswordResetTokensService(PasswordResetTokenRepository tokenRepository); @Transactional Long removeExpiredTokens(); }
RemoveExpiredPasswordResetTokensService { @Transactional public Long removeExpiredTokens() { return tokenRepository.deleteByExpiresLessThan(now()); } @Autowired  RemoveExpiredPasswordResetTokensService(PasswordResetTokenRepository tokenRepository); @Transactional Long removeExpiredTokens();  }