@Test
public void testGetMonthValue() {

  int date = pack(LocalDate.of(2015, 1, 25));
  Month[] months = Month.values();
  for (int i = 0; i < months.length; i++) {
    assertEquals(months[i], getMonth(date));
    assertEquals(i + 1, getMonthValue(date));
    switch (i) {
      case 0:
        assertTrue(isInJanuary(date));
        break;
      case 1:
        assertTrue(isInFebruary(date));
        break;
      case 2:
        assertTrue(isInMarch(date));
        break;
      case 3:
        assertTrue(isInApril(date));
        break;
      case 4:
        assertTrue(isInMay(date));
        break;
      case 5:
        assertTrue(isInJune(date));
        break;
      case 6:
        assertTrue(isInJuly(date));
        break;
      case 7:
        assertTrue(isInAugust(date));
        break;
      case 8:
        assertTrue(isInSeptember(date));
        break;
      case 9:
        assertTrue(isInOctober(date));
        break;
      case 10:
        assertTrue(isInNovember(date));
        break;
      case 11:
        assertTrue(isInDecember(date));
        break;
      default:
        throw new IllegalArgumentException("Can't have a month outside this range");
    }
    date = plusMonths(1, date);
  }
}