def METHOD_NAME(widget, value, expected, on_change_handler):
    "The value of the datepicker can be set"
    widget.value = value
    assert widget.value == expected
    on_change_handler.assert_called_once_with(widget)