hasEfforts(hours(8), hours(10)));
}
@Test
public void mixingNotOverAssignableAndOverassignableToALimit() {
Distributor distributor = Distributor.among(Capacity.create(hours(8))
.withAllowedExtraEffort(hours(2)), Capacity.create(hours(8))
.notOverAssignableWithoutLimit());
assertThat(distributor.distribute(hours(16)),
hasEfforts(hours(8), hours(8)));
assertThat(distributor.distribute(hours(17)),
hasEfforts(hours(9), hours(8)));
assertThat(distributor.distribute(hours(18)),
hasEfforts(hours(10), hours(8)));
assertThat(distributor.distribute(hours(19)),
hasEfforts(hours(10), hours(8)));
}