@Test
    void validateValueInternal_maxDateTime_Date_wrong() {
        setupValues(null, Locale.ENGLISH);
        java.util.Calendar cal = GregorianCalendar.getInstance();
        cal.set(2019, 8, 17);
        cal.set(Calendar.HOUR_OF_DAY, 12);
        cal.set(Calendar.MINUTE, 00);
        cal.set(Calendar.SECOND, 00);
        cal.set(Calendar.MILLISECOND, 0);

        when(datePicker.isShowTime()).thenReturn(Boolean.TRUE);
        when(datePicker.getMaxdate()).thenReturn(cal.getTime());
        DatePicker.ValidationResult validationResult = datePicker.validateValueInternal(context, LocalDateTime.of(2019, 9, 17, 12, 05));
        assertFalse(datePicker.isValid());
        assertEquals(DatePicker.ValidationResult.INVALID_MAX_DATE, validationResult);
    }
Invalid {@link ResolverStyle}. The date 02/30/2019 is silently parsed to
02/28/2019 as default value 'SMART' is used.
primefaces/src/test/java/org/primefaces/component/datepicker/DatePickerTest.java