def METHOD_NAME():
    """
    Test writing a default setting with a boolean that is already set to the same value
    """
    expected = {
        "changes": {},
        "comment": "com.apple.something Key is already set to YES",
        "name": "Key",
        "result": True,
    }
    read_mock = MagicMock(return_value="1")
    write_mock = MagicMock(return_value={"retcode": 0})
    with patch.dict(
        macdefaults.__salt__,
        {"macdefaults.read": read_mock, "macdefaults.write": write_mock},
    ):
        out = macdefaults.write("Key", "com.apple.something", "YES", vtype="boolean")
        read_mock.assert_called_once_with("com.apple.something", "Key", None)
        assert not write_mock.called
        assert out == expected