EditAttributeWidgetFactory { public DatePicker datePicker(final RuleAttribute ruleAttribute, final boolean allowEmptyValues) { final DatePicker datePicker = new DatePicker(allowEmptyValues); initDatePickerByRuleAttribute(datePicker, ruleAttribute); return datePicker; } EditAttributeWidgetFactory(final boolean isReadOnly); TextBox textBox(final RuleAttribute ruleAttribute, final String dataType); DatePicker datePicker(final RuleAttribute ruleAttribute, final boolean allowEmptyValues);  }
@Test public void testDatePicker() { final DatePicker picker = factory.datePicker(ruleAttribute, false); verify(factory).initDatePickerByRuleAttribute(picker, ruleAttribute); }