public void factory_ofEpochDay() {

    long date_0000_01_01 = -678941 - 40587;
    assertEquals(LocalDate.ofEpochDay(0), LocalDate.of(1970, 1, 1));
    assertEquals(LocalDate.ofEpochDay(date_0000_01_01), LocalDate.of(0, 1, 1));
    assertEquals(LocalDate.ofEpochDay(date_0000_01_01 - 1), LocalDate.of(-1, 12, 31));
    assertEquals(LocalDate.ofEpochDay(this.MAX_VALID_EPOCHDAYS), LocalDate.of(Year.MAX_YEAR, 12, 31));
    assertEquals(LocalDate.ofEpochDay(this.MIN_VALID_EPOCHDAYS), LocalDate.of(Year.MIN_YEAR, 1, 1));

    LocalDate test = LocalDate.of(0, 1, 1);
    for (long i = date_0000_01_01; i < 700000; i++) {
      assertEquals(LocalDate.ofEpochDay(i), test);
      test = next(test);
    }
    test = LocalDate.of(0, 1, 1);
    for (long i = date_0000_01_01; i > -2000000; i--) {
      assertEquals(LocalDate.ofEpochDay(i), test);
      test = previous(test);
    }
  }

  @Test(expectedExceptions = DateTimeException.class, groups = { "tck" }