@Test
public void testDatePickerValueChangeHandlerNullValue() {

    final DatePicker datePicker = mock(DatePicker.class);
    final Date datePickerValue = null;
    doReturn(datePickerValue).when(datePicker).getValue();
    factory.initDatePickerByRuleAttribute(datePicker, ruleAttribute);
    verify(datePicker).addValueChangeHandler(valueChangeHandlerArgumentCaptor.capture());
    valueChangeHandlerArgumentCaptor.getValue().onValueChange(null);
    verify(ruleAttribute).setValue(eq(null));
}