@Test public void removesTheExpiredPasswordToken() throws Exception { given(removeTokenService.removeExpiredTokens()).willReturn(3L); underTest.removeExpiredTokens(); verify(removeTokenService, times(1)).removeExpiredTokens(); }
@Scheduled(fixedDelayString = "${canvass.passwordTokenExpiryDeletedUpdateInterval}") public void removeExpiredTokens() { long numDeleted = tokenRemovalService.removeExpiredTokens(); if (numDeleted > 0) { log.info(String.format("Removed %s expired reset password tokens", numDeleted)); } }
ResetPasswordTokenExpirationCheck { @Scheduled(fixedDelayString = "${canvass.passwordTokenExpiryDeletedUpdateInterval}") public void removeExpiredTokens() { long numDeleted = tokenRemovalService.removeExpiredTokens(); if (numDeleted > 0) { log.info(String.format("Removed %s expired reset password tokens", numDeleted)); } } }
ResetPasswordTokenExpirationCheck { @Scheduled(fixedDelayString = "${canvass.passwordTokenExpiryDeletedUpdateInterval}") public void removeExpiredTokens() { long numDeleted = tokenRemovalService.removeExpiredTokens(); if (numDeleted > 0) { log.info(String.format("Removed %s expired reset password tokens", numDeleted)); } } @Autowired  ResetPasswordTokenExpirationCheck(RemoveExpiredPasswordResetTokensService tokenRemovalService); }
ResetPasswordTokenExpirationCheck { @Scheduled(fixedDelayString = "${canvass.passwordTokenExpiryDeletedUpdateInterval}") public void removeExpiredTokens() { long numDeleted = tokenRemovalService.removeExpiredTokens(); if (numDeleted > 0) { log.info(String.format("Removed %s expired reset password tokens", numDeleted)); } } @Autowired  ResetPasswordTokenExpirationCheck(RemoveExpiredPasswordResetTokensService tokenRemovalService); @Scheduled(fixedDelayString = "${canvass.passwordTokenExpiryDeletedUpdateInterval}") void removeExpiredTokens(); }
ResetPasswordTokenExpirationCheck { @Scheduled(fixedDelayString = "${canvass.passwordTokenExpiryDeletedUpdateInterval}") public void removeExpiredTokens() { long numDeleted = tokenRemovalService.removeExpiredTokens(); if (numDeleted > 0) { log.info(String.format("Removed %s expired reset password tokens", numDeleted)); } } @Autowired  ResetPasswordTokenExpirationCheck(RemoveExpiredPasswordResetTokensService tokenRemovalService); @Scheduled(fixedDelayString = "${canvass.passwordTokenExpiryDeletedUpdateInterval}") void removeExpiredTokens();  }