@Test
 public void testStartAndEndSame2() {
   final ZonedDateTime date = DateUtils.getUTCDate(2000, 1, 1);
   final ZonedDateTime[] dates = CALCULATOR.getSchedule(date, date);
   assertEquals(dates.length, 1);
   assertEquals(dates[0], date);
 }
 @Test
 public void testStartAndEndSame1() {
   final LocalDate date = LocalDate.of(2000, 1, 1);
   final LocalDate[] dates = CALCULATOR.getSchedule(date, date);
   assertEquals(dates.length, 1);
   assertEquals(dates[0], date);
 }
 @Test
 public void test1() {
   LocalDate startDate = LocalDate.of(2000, 1, 1);
   LocalDate endDate = LocalDate.of(2000, 12, 30);
   LocalDate[] forward = CALCULATOR.getSchedule(startDate, endDate, false, true);
   assertEquals(forward.length, 1);
   assertEquals(forward[0], startDate);
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, true, true));
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, false, false));
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, true, false));
   startDate = LocalDate.of(2000, 1, 2);
   endDate = LocalDate.of(2000, 12, 30);
   forward = CALCULATOR.getSchedule(startDate, endDate, false, true);
   assertEquals(forward.length, 0);
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, true, true));
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, false, false));
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, true, false));
   startDate = LocalDate.of(2002, 2, 2);
   endDate = LocalDate.of(2003, 2, 9);
   forward = CALCULATOR.getSchedule(startDate, endDate, false, true);
   assertEquals(forward.length, 1);
   assertEquals(forward[0], LocalDate.of(2003, 1, 1));
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, true, true));
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, false, false));
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, true, false));
   startDate = LocalDate.of(2000, 1, 1);
   endDate = LocalDate.of(2010, 2, 9);
   final int months = 11;
   forward = CALCULATOR.getSchedule(startDate, endDate, false, true);
   assertEquals(forward.length, months);
   assertEquals(forward[0], startDate);
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, true, true));
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, false, false));
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, true, false));
   final LocalDate lastDate = LocalDate.of(2010, 1, 1);
   assertEquals(forward[months - 1], lastDate);
   for (int i = 1; i < months; i++) {
     if (forward[i].getYear() == forward[i - 1].getYear()) {
       assertEquals(forward[i].getYear() - forward[i - 1].getYear(), 1);
       assertEquals(forward[i].getMonthOfYear().getValue(), 1);
       assertEquals(forward[i].getDayOfMonth(), 1);
     }
   }
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, true, true));
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, false, false));
   assertArrayEquals(forward, CALCULATOR.getSchedule(startDate, endDate, true, false));
 }
 @Test(expectedExceptions = IllegalArgumentException.class)
 public void testStartAndEndSameButInvalid4() {
   CALCULATOR.getSchedule(LocalDate.of(2001, 2, 1), LocalDate.of(2001, 2, 1), false, true);
 }
 @Test(expectedExceptions = IllegalArgumentException.class)
 public void testStartAndEndSameButInvalid2() {
   CALCULATOR.getSchedule(
       DateUtils.getUTCDate(2001, 2, 1), DateUtils.getUTCDate(2001, 2, 1), false, true);
 }