@Test public void testIfCanReturnNextAlarmDateForSleepNowStrategy() { itemsBuilder.setBuildingStrategy(new SleepNowBuildingStrategy()); assertEquals(getDateTime("05/02/2011 02:30"), itemsBuilder.getNextAlarmDate(getDateTime("05/02/2011 01:00"))); assertEquals(getDateTime("06/02/2011 01:25"), itemsBuilder.getNextAlarmDate(getDateTime("05/02/2011 23:55"))); assertEquals(getDateTime("05/02/2011 00:00"), itemsBuilder.getNextAlarmDate(getDateTime("04/02/2011 22:30"))); }
@Override public DateTime getNextAlarmDate(DateTime executionDate) { return getBuildingStrategy().getNextAlarmDate(executionDate); }
ItemsBuilder extends ItemsBuilderAbstraction { @Override public DateTime getNextAlarmDate(DateTime executionDate) { return getBuildingStrategy().getNextAlarmDate(executionDate); } }
ItemsBuilder extends ItemsBuilderAbstraction { @Override public DateTime getNextAlarmDate(DateTime executionDate) { return getBuildingStrategy().getNextAlarmDate(executionDate); }  }
ItemsBuilder extends ItemsBuilderAbstraction { @Override public DateTime getNextAlarmDate(DateTime executionDate) { return getBuildingStrategy().getNextAlarmDate(executionDate); }  @Override List<Item> getItems(DateTime currentDate, DateTime executionDate); @Override DateTime getNextAlarmDate(DateTime executionDate); @Override boolean isPossibleToCreateNextItem(DateTime currentDate, DateTime executionDate); }
ItemsBuilder extends ItemsBuilderAbstraction { @Override public DateTime getNextAlarmDate(DateTime executionDate) { return getBuildingStrategy().getNextAlarmDate(executionDate); }  @Override List<Item> getItems(DateTime currentDate, DateTime executionDate); @Override DateTime getNextAlarmDate(DateTime executionDate); @Override boolean isPossibleToCreateNextItem(DateTime currentDate, DateTime executionDate);  }