Worker worker1 = workerWithAlwaysAssignedHours(4);
Worker worker2 = workerWithAlwaysAssignedHours(6);
givenFinder(worker1, worker2);
givenConfigurationUnit(new BigDecimal(1.5));
givenDayAssignments(new LocalDate(2009, 10, 20), 8, 8, 8, 4);
DerivedAllocation derivedAllocation = DerivedAllocationGenerator
.generate(derivedFrom, finder, configurationUnit,
dayAssignments);
List<DerivedDayAssignment> assignments = derivedAllocation
.getAssignments();
Map<Resource, List<DerivedDayAssignment>> byResource = DayAssignment
.byResourceAndOrdered(assignments);
assertThat(byResource.get(worker1), haveHours(7, 7, 7, 4));
assertThat(byResource.get(worker2), haveHours(5, 5, 5, 2));