assertThat(calendar.getExceptions().size(), equalTo(0));
}
@Test
public void testCapacityOnNewVersionFromChristmasCalendar() {
BaseCalendar calendar = createChristmasCalendar();
CalendarException day = CalendarException.create(
CHRISTMAS_DAY_LOCAL_DATE.plusYears(1), EffortDuration.zero(),
createCalendarExceptionType());
calendar.addExceptionDay(day);
calendar.newVersion(CHRISTMAS_DAY_LOCAL_DATE.plusDays(1));
CalendarExceptionType type = createCalendarExceptionType();
calendar.updateExceptionDay(CHRISTMAS_DAY_LOCAL_DATE.plusYears(1),
Capacity.create(hours(8)).withAllowedExtraEffort(
type.getCapacity().getAllowedExtraEffort()), type);
assertThat(calendar.getCapacityOn(wholeDay(CHRISTMAS_DAY_LOCAL_DATE
.plusYears(1))), equalTo(hours(8)));
assertThat(calendar.getCapacityOn(wholeDay(CHRISTMAS_DAY_LOCAL_DATE)),
equalTo(zero()));
}