@Test
public void testInitDatePickerByRuleAttribute() {

    final DatePicker datePicker = mock(DatePicker.class);
    final String attributeValue = "31-May-2018";
    doReturn(attributeValue).when(ruleAttribute).getValue();
    factory.initDatePickerByRuleAttribute(datePicker, ruleAttribute);
    // not robust verifications because of Date formatting / parsing is mocked by GwtMockito
    verify(datePicker).setFormat(any());
    verify(datePicker).setValue(notNull(Date.class));
}