PolishHolidays implements Holidays { @Override public LocalDate nextWorkingDayAfter(LocalDate date) { LocalDate cur = date; do { cur = cur.plusDays(1); } while(isHoliday(cur)); return cur; }  boolean isHoliday(LocalDate date); @Override boolean isWorkingDay(LocalDate date); @Override LocalDate nextHolidayAfter(LocalDate date); @Override LocalDate nextWorkingDayAfter(LocalDate date);  }
@Test public void shouldFindNextWorkingDay() { assertThat(holidays.nextWorkingDayAfter(LocalDate.of(2014, APRIL, 24))).isEqualTo(LocalDate.of(2014, APRIL, 25)); assertThat(holidays.nextWorkingDayAfter(LocalDate.of(2014, APRIL, 25))).isEqualTo(LocalDate.of(2014, APRIL, 28)); assertThat(holidays.nextWorkingDayAfter(LocalDate.of(2014, APRIL, 26))).isEqualTo(LocalDate.of(2014, APRIL, 28)); assertThat(holidays.nextWorkingDayAfter(LocalDate.of(2014, APRIL, 28))).isEqualTo(LocalDate.of(2014, APRIL, 29)); assertThat(holidays.nextWorkingDayAfter(LocalDate.of(2014, APRIL, 30))).isEqualTo(LocalDate.of(2014, MAY, 2)); }