### Question:
Scheduler { ScheduledTime getSlidingWindowStartTime(ScheduledTime current) { return new ScheduledTime(current.getDateTime().minusHours(slidingWindowHours)); } Scheduler(WorkflowConfiguration configuration, int slidingWindowHours); void step(ScheduledTime current, StateDatabaseConnection connection); void step(ScheduledTime current, Set<WorkflowID> workflowIDs, StateDatabaseConnection connection); List<SlotState> getSlotStatesIncludingMarkedForRerun(Workflow wf, ScheduledTime current, ScheduledTime start, ScheduledTime end, StateDatabaseConnection connection); List<SlotState> getSlotStates(Workflow wf, ScheduledTime start, ScheduledTime end, StateDatabaseConnection connection); ScheduledTime getWorkflowStartTime(Workflow wf, ScheduledTime current); int getSlidingWindowHours(); WorkflowConfiguration getWorkflowConfiguration();  }### Answer:
@Test public void slidingWindowSizeWorks() { ScheduledTime t = new ScheduledTime("2013-11-26T20:00Z"); int hours = 5; Scheduler scheduler = new Scheduler(new WorkflowConfiguration(), hours); Assert.assertEquals(scheduler.getSlidingWindowStartTime(t), new ScheduledTime("2013-11-26T15:00Z")); }