### Question:
LocalDateGenerator implements Generator<LocalDate> { @Override public LocalDate next() { final LocalDate lower = range.lowerBound(); final LocalDate upper = range.upperBound(); if (lower.equals(upper)) { return lower; } final int year = generateYear(lower, upper); final int month = generateMonth(lower, upper, year); final int day = generateDay(lower, upper, year, month); return LocalDate.of(year, month, day); } LocalDateGenerator(final RandomValues randomValues, final Range<LocalDate> range); @Override LocalDate next();  }### Answer:
@Test public void futureDateWhereMaxDateIsTomorrow() { final LocalDate tomorrow = LocalDate.MAX; final LocalDate today = tomorrow.minusDays(1); Timekeeper.from(fixedClock(today)); final LocalDate futureDate = localDate(inTheFuture()).next(); assertThat(futureDate) .describedAs("future date should be tomorrow [%s] when today is [%s] and the max is tomorrow", tomorrow, today) .isEqualTo(tomorrow); }
@Test public void pastDateWhereMinDateIsYesterday() { final LocalDate yesterday = LocalDate.MIN; final LocalDate today = yesterday.plusDays(1); Timekeeper.from(fixedClock(today)); final LocalDate pastDate = localDate(inThePast()).next(); assertThat(pastDate) .describedAs("past date should be yesterday [%s] when today is [%s] and the min is yesterday", yesterday, today) .isEqualTo(yesterday); }