@Test
public void theAmountOfTheIncreaseDependsOnTheAmountOfResourcesPerDay() {
LocalDate today = new LocalDate();
IntraDayDate intraDate = IntraDayDate.startOfDay(today);
EffortDuration effort = hours(6);
ResourcesPerDay half = ResourcesPerDay.amount(new BigDecimal(BigInteger
.valueOf(5), 1));
ResourcesPerDay oneQuarter = ResourcesPerDay.amount(new BigDecimal(
BigInteger.valueOf(25), 2));
ResourcesPerDay[] resourcesPerDays = { ResourcesPerDay.amount(2),
ResourcesPerDay.amount(3), half, oneQuarter,
ResourcesPerDay.amount(4) };
EffortDuration[] ends = { hours(3), hours(2), hours(12), hours(24),
hours(1).and(30, Granularity.MINUTES) };
for (int i = 0; i < resourcesPerDays.length; i++) {
ResourcesPerDay r = resourcesPerDays[i];
EffortDuration end = ends[i];
IntraDayDate newDay = intraDate.increaseBy(r, effort);
assertThat(newDay.getDate(), equalTo(today));
assertThat(newDay.getEffortDuration(), equalTo(end));
}