def METHOD_NAME(self, mock_results_response, mock_generate_token):
    mocked_return_value = {"code": 200}
    mock_generate_token.return_value = mocked_return_value
    mocked_return_value = {
        "code": 400,
        "message": "Bad Request"
    }
    mock_results_response.return_value = mocked_return_value
    query = '{"query": {"host": "192.168.122.83", "start": 9580878, "end": 12345678}, "source": "events"}'
    offset = 0
    length = 1
    entry_point = EntryPoint(self.connection(), self.configuration())
    results_response = run_in_thread(entry_point.create_results_connection, query, offset, length)
    assert results_response is not None
    assert results_response['success'] is False
    assert results_response['error'] == 'datadog connector error => Bad Request'
    assert results_response['code'] == ErrorCode.TRANSMISSION_INVALID_PARAMETER.value