def METHOD_NAME(instance):
    http = MagicMock()
    config = UnifiConfig(instance)
    api = Unifi(config, http, MagicMock())
    try:
        api._get_json("foo")
    except Exception as e:
        raise AssertionError(f"_get_json raised an exception: {e}")
    http.get.side_effect = authetication_error(401)
    with pytest.raises(Unauthorized):
        api._get_json("foo")
    http.get.side_effect = authetication_error(400)
    with pytest.raises(HTTPError):
        api._get_json("foo")
    http.get.side_effect = Timeout()
    with pytest.raises(Timeout):
        api._get_json("foo")