':type SettingProvider: unittest.mock.Mock'

@patch('Orange.widgets.settings.SettingProvider', create=True)
def test_create(self, SettingProvider):

    mock_read_defaults = Mock()
    with patch.object(SettingsHandler, 'read_defaults', mock_read_defaults):
        handler = SettingsHandler.create(SimpleWidget)
        self.assertEqual(handler.widget_class, SimpleWidget)
        SettingProvider.assert_called_once_with(SimpleWidget)
        mock_read_defaults.assert_called_once_with()
