DateTimePicker extends CustomField<LocalDateTime> { @Override public void clear() { datePicker.clear(); timePicker.clear(); } DateTimePicker(Locale locale); @Override void clear(); DatePicker getDatePicker(); TimePicker getTimePicker(); void setI18n(DatePickerI18n i18n);  }
@Test public void testClear() { DateTimePicker picker = new DateTimePicker(locale); picker.setValue(LocalDateTime.of(2019, 4, 3, 10, 12)); picker.clear(); DatePicker dp = picker.getDatePicker(); TimePicker tp = picker.getTimePicker(); assertNull(picker.generateModelValue()); assertNull(dp.getValue()); assertNull(tp.getValue()); }