def METHOD_NAME(instance):
    with mock.patch(
        'requests.get',
        return_value=MockResponse(status_code=400),
    ):
        check = ESCheck('elastic', {}, instances=[instance])
        with pytest.raises(AuthenticationError):
            check._get_data(url='test.com')