def METHOD_NAME():
    widget = EncodingWidget(df, encoding, change_hook, ipywidget_factory, testing=True)
    widget._y_changed_callback("name", "old", "new")
    assert encoding.y == "new"
    assert change_hook.call_count == 1