def METHOD_NAME(
    client: TestClient,
    processing_graph: ProcessingGraph,
    cursor: Optional[str],
    http_status: int,
    error_code: Optional[str],
) -> None:
    first_step = processing_graph.get_processing_steps()[0]
    path = first_step.cache_kind
    cursor_str = f"?cursor={cursor}" if cursor else ""
    response = client.request("get", f"/cache-reports-with-content/{path}{cursor_str}")
    assert response.status_code == http_status
    if error_code:
        assert isinstance(response.json()["error"], str)
        assert response.headers["X-Error-Code"] == error_code
    else:
        assert response.json() == {"cache_reports_with_content": [], "next_cursor": ""}
        assert "X-Error-Code" not in response.headers