def METHOD_NAME(
    middleware,
    start_response,
    snapshot,
    graphql_query_request_factory,
    error_response_headers,
):
    request = graphql_query_request_factory(content_type="text/plain")
    result = middleware(request, start_response)
    start_response.assert_called_once_with(
        HttpBadRequestError.status, error_response_headers
    )
    snapshot.assert_match(result)