@Test void testExecute() { cleaner.execute(EXPIRATION_TIME); verify(progressMessageService.createQuery() .olderThan(EXPIRATION_TIME)).delete(); }
@Override public void execute(Date expirationTime) { LOGGER.debug(CleanUpJob.LOG_MARKER, format(Messages.DELETING_PROGRESS_MESSAGES_STORED_BEFORE_0, expirationTime)); int removedProgressMessages = progressMessageService.createQuery() .olderThan(expirationTime) .delete(); LOGGER.info(CleanUpJob.LOG_MARKER, format(Messages.DELETED_PROGRESS_MESSAGES_0, removedProgressMessages)); }
ProgressMessagesCleaner implements Cleaner { @Override public void execute(Date expirationTime) { LOGGER.debug(CleanUpJob.LOG_MARKER, format(Messages.DELETING_PROGRESS_MESSAGES_STORED_BEFORE_0, expirationTime)); int removedProgressMessages = progressMessageService.createQuery() .olderThan(expirationTime) .delete(); LOGGER.info(CleanUpJob.LOG_MARKER, format(Messages.DELETED_PROGRESS_MESSAGES_0, removedProgressMessages)); } }
ProgressMessagesCleaner implements Cleaner { @Override public void execute(Date expirationTime) { LOGGER.debug(CleanUpJob.LOG_MARKER, format(Messages.DELETING_PROGRESS_MESSAGES_STORED_BEFORE_0, expirationTime)); int removedProgressMessages = progressMessageService.createQuery() .olderThan(expirationTime) .delete(); LOGGER.info(CleanUpJob.LOG_MARKER, format(Messages.DELETED_PROGRESS_MESSAGES_0, removedProgressMessages)); } @Inject  ProgressMessagesCleaner(ProgressMessageService progressMessageService); }
ProgressMessagesCleaner implements Cleaner { @Override public void execute(Date expirationTime) { LOGGER.debug(CleanUpJob.LOG_MARKER, format(Messages.DELETING_PROGRESS_MESSAGES_STORED_BEFORE_0, expirationTime)); int removedProgressMessages = progressMessageService.createQuery() .olderThan(expirationTime) .delete(); LOGGER.info(CleanUpJob.LOG_MARKER, format(Messages.DELETED_PROGRESS_MESSAGES_0, removedProgressMessages)); } @Inject  ProgressMessagesCleaner(ProgressMessageService progressMessageService); @Override void execute(Date expirationTime); }
ProgressMessagesCleaner implements Cleaner { @Override public void execute(Date expirationTime) { LOGGER.debug(CleanUpJob.LOG_MARKER, format(Messages.DELETING_PROGRESS_MESSAGES_STORED_BEFORE_0, expirationTime)); int removedProgressMessages = progressMessageService.createQuery() .olderThan(expirationTime) .delete(); LOGGER.info(CleanUpJob.LOG_MARKER, format(Messages.DELETED_PROGRESS_MESSAGES_0, removedProgressMessages)); } @Inject  ProgressMessagesCleaner(ProgressMessageService progressMessageService); @Override void execute(Date expirationTime);  }