public void whenResettingAssignmentsOnIntervalOnlyTheOnesAtTheIntervalAreAdded() {
givenADerivedAllocation();
LocalDate start = new LocalDate(2008, 12, 1);
givenDayAssignments(start, worker, 8, 8, 8, 8);
derivedAllocation.resetAssignmentsTo(dayAssignments);
DerivedDayAssignment newAssignment = DerivedDayAssignment.create(start
.minusDays(1), 3, worker, derivedAllocation);
derivedAllocation.resetAssignmentsTo(start, start.plusDays(4), Arrays
.asList(newAssignment));
assertTrue(derivedAllocation.getAssignments().isEmpty());
}