diff --git a/src/test/java/org/apache/commons/lang3/time/CalendarUtilsTest.java b/src/test/java/org/apache/commons/lang3/time/CalendarUtilsTest.java index 38bcf808c1e..71b1b54fb5f 100644 --- a/src/test/java/org/apache/commons/lang3/time/CalendarUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/time/CalendarUtilsTest.java @@ -20,6 +20,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import java.time.LocalDate; +import java.time.Month; import java.util.Calendar; import java.util.Locale; import java.util.GregorianCalendar; @@ -90,8 +91,8 @@ public void testGetYear() { public void testToLocalDate() { Calendar calendar = new GregorianCalendar(TimeZone.getTimeZone("GMT")); calendar.setTimeInMillis(-27078001200000L); - assertEquals(LocalDate.of(1111, 12, 1), new CalendarUtils(calendar).toLocalDate()); + assertEquals(LocalDate.of(1111, Month.DECEMBER, 1), new CalendarUtils(calendar).toLocalDate()); calendar.setTimeInMillis(1614700215000L); - assertEquals(LocalDate.of(2021, 3, 2), new CalendarUtils(calendar).toLocalDate()); + assertEquals(LocalDate.of(2021, Month.MARCH, 2), new CalendarUtils(calendar).toLocalDate()); } }