def METHOD_NAME(client, monkeypatch, sub_agency_data_1, elasticsearch_transaction_index):
    setup_elasticsearch_test(monkeypatch, elasticsearch_transaction_index)
    resp = client.get(url.format(toptier_code="001", filter="?fiscal_year=2021"))
    expected_results = [
        {
            "name": "Sub-Agency 1",
            "abbreviation": "A1",
            "total_obligations": 515,
            "transaction_count": 5,
            "new_award_count": 4,
            "children": [
                {
                    "name": "Office 2",
                    "code": "0002",
                    "total_obligations": 312.0,
                    "transaction_count": 3,
                    "new_award_count": 3,
                },
                {
                    "name": "Office 1",
                    "code": "0001",
                    "total_obligations": 203.0,
                    "transaction_count": 2,
                    "new_award_count": 1,
                },
            ],
        }
    ]
    assert resp.status_code == status.HTTP_200_OK
    assert resp.json()["results"] == expected_results