public void testStartBeforeEndAfterWorkingHours() {
DateTime lastCalculated = new DateTime(2009, 6, 22, 8, 55, 0, 0);
DateTime now = new DateTime(2009, 6, 22, 18, 00, 0, 0);
Duration elapsedTime = calculator.calculateElapsedTime(lastCalculated, now, SLAWorkingHours.OFFICE_HOURS_9_TO_5_30);
Assert.assertEquals("PT8H30M", elapsedTime.toPeriod().toString());
}
public void testStartInEndInWorkingHours() {
DateTime lastCalculated = new DateTime(2009, 6, 22, 14, 05, 0, 0);
DateTime now = new DateTime(2009, 6, 22, 14, 17, 0, 0);