@Test
public void testWithDayOfMonth() {

  LocalDate day = LocalDate.of(2011, 3, 9);
  int packed = pack(day);
  int day2 = withDayOfMonth(4, packed);
  assertEquals(4, getDayOfMonth(day2));
  assertEquals(2011, getYear(day2));
}