DateTimeUtils { public static Month asMonth(String month) { Month aMonth = MONTHMAP.get(month.toLowerCase()); if (aMonth == null) { LOGGER.warn("Couldn't parse month {}", month); } return aMonth; } private  DateTimeUtils(); static DayOfWeek asDay(String day); static Month asMonth(String month); static Year asYear(String s); static boolean suffixCorrect(Integer date, String suffix);  }
@Test public void testAsMonth() { assertMonth(Month.JANUARY, "Jan", "January", "1", "01"); assertMonth(Month.FEBRUARY, "Feb", "FebUARy", "2", "02", "FEBRUARY"); assertMonth(Month.MARCH, "Mar", "March", "3", "03"); assertMonth(Month.APRIL, "Apr", "AprIL", "4", "04"); assertMonth(Month.MAY, "May", "5", "05"); assertMonth(Month.JUNE, "Jun", "June", "6", "06"); assertMonth(Month.JULY, "Jul", "July", "7", "07"); assertMonth(Month.AUGUST, "Aug", "AugUST", "8", "08"); assertMonth(Month.SEPTEMBER, "Sep", "SePT", "September", "9", "09"); assertMonth(Month.OCTOBER, "oct", "October", "10"); assertMonth(Month.NOVEMBER, "NoV", "November", "11"); assertMonth(Month.DECEMBER, "dec", "December", "Christmas", "12"); assertMonth(null, "ma", "j", "movember", "0", "13"); }