@Transactional
public void addingAdditionalAssignmentsKeepOld() {
givenWorker();
LocalDate today = new LocalDate();
LocalDate tomorrow = today.plus(Days.days(1));
SpecificDayAssignment specificDayAssignment = new SpecificDayAssignment(
today, hours(10), worker);
SpecificDayAssignment another = new SpecificDayAssignment(tomorrow,
hours(10),
worker);
givenWorkerWithAssignments(specificDayAssignment, another);
DayAssignment other = new SpecificDayAssignment(today, hours(3), worker);
worker.addNewAssignments(Arrays.asList(other));
assertTrue(worker.getAssignments().size() == assignments.size() + 1);
}