@Test public void testExecute() { DeleteOldStreamHashTagsExecution sut = new DeleteOldStreamHashTagsExecution(deleteMapper, activityHashTagExpirationInMinutes); context.checking(new Expectations() { { oneOf(deleteMapper).execute(with(any(Date.class))); } }); sut.execute(null); context.assertIsSatisfied(); }
@Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { log.trace("Deleting StreamHashTag records older than " + activityHashTagExpirationInMinutes + " minutes."); Calendar cal = Calendar.getInstance(); cal.add(Calendar.MINUTE, -activityHashTagExpirationInMinutes); int numberOfDeletedRecords = deleteMapper.execute(cal.getTime()); log.trace("Deleted " + numberOfDeletedRecords + " stream hashtag records."); return true; }
DeleteOldStreamHashTagsExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { log.trace("Deleting StreamHashTag records older than " + activityHashTagExpirationInMinutes + " minutes."); Calendar cal = Calendar.getInstance(); cal.add(Calendar.MINUTE, -activityHashTagExpirationInMinutes); int numberOfDeletedRecords = deleteMapper.execute(cal.getTime()); log.trace("Deleted " + numberOfDeletedRecords + " stream hashtag records."); return true; } }
DeleteOldStreamHashTagsExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { log.trace("Deleting StreamHashTag records older than " + activityHashTagExpirationInMinutes + " minutes."); Calendar cal = Calendar.getInstance(); cal.add(Calendar.MINUTE, -activityHashTagExpirationInMinutes); int numberOfDeletedRecords = deleteMapper.execute(cal.getTime()); log.trace("Deleted " + numberOfDeletedRecords + " stream hashtag records."); return true; } DeleteOldStreamHashTagsExecution(final DeleteOldStreamHashTagRecordsDbMapper inDeleteMapper,
            final Integer inActivityHashTagExpirationInMinutes); }
DeleteOldStreamHashTagsExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { log.trace("Deleting StreamHashTag records older than " + activityHashTagExpirationInMinutes + " minutes."); Calendar cal = Calendar.getInstance(); cal.add(Calendar.MINUTE, -activityHashTagExpirationInMinutes); int numberOfDeletedRecords = deleteMapper.execute(cal.getTime()); log.trace("Deleted " + numberOfDeletedRecords + " stream hashtag records."); return true; } DeleteOldStreamHashTagsExecution(final DeleteOldStreamHashTagRecordsDbMapper inDeleteMapper,
            final Integer inActivityHashTagExpirationInMinutes); @Override Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext); }
DeleteOldStreamHashTagsExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { log.trace("Deleting StreamHashTag records older than " + activityHashTagExpirationInMinutes + " minutes."); Calendar cal = Calendar.getInstance(); cal.add(Calendar.MINUTE, -activityHashTagExpirationInMinutes); int numberOfDeletedRecords = deleteMapper.execute(cal.getTime()); log.trace("Deleted " + numberOfDeletedRecords + " stream hashtag records."); return true; } DeleteOldStreamHashTagsExecution(final DeleteOldStreamHashTagRecordsDbMapper inDeleteMapper,
            final Integer inActivityHashTagExpirationInMinutes); @Override Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext);  }