def METHOD_NAME():
    """
    Test to pair bluetooth adapter with a device
    """
    mock = MagicMock(side_effect=[False, True, True])
    with patch.object(salt.utils.validate.net, "mac", mock):
        pytest.raises(CommandExecutionError, bluez.pair, "DE:AD:BE:EF:CA:FE", "1234")
        pytest.raises(CommandExecutionError, bluez.pair, "DE:AD:BE:EF:CA:FE", "abcd")
        mock = MagicMock(return_value={"device": "hci0"})
        with patch.object(bluez, "address_", mock):
            mock = MagicMock(return_value="Ok")
            with patch.dict(bluez.__salt__, {"cmd.run": mock}):
                assert bluez.pair("DE:AD:BE:EF:CA:FE", "1234") == ["Ok"]