def METHOD_NAME(
    middleware,
    start_response,
    snapshot,
    graphql_query_request_factory,
    error_response_headers,
):
    request = graphql_query_request_factory(raw_data="not-json")
    result = middleware(request, start_response)
    start_response.assert_called_once_with(
        HttpBadRequestError.status, error_response_headers
    )
    snapshot.assert_match(result)