@Test
public void testLengthOfYear() {

  LocalDate day = LocalDate.of(2000, 1, 3);
  int packed = pack(day);
  assertEquals(366, lengthOfYear(packed));
  day = LocalDate.of(2001, 1, 3);
  packed = pack(day);
  assertEquals(365, lengthOfYear(packed));
}