def METHOD_NAME():
    query = SearchQuery()
    assert "sort" not in query
    # returns self
    assert query.add_sort("f") is query
    assert query["sort"]
    assert len(query["sort"]) == 1
    assert query["sort"][0] == {"field_name": "f"}
    # with order
    query.add_sort("f", order="asc")
    assert len(query["sort"]) == 2
    assert query["sort"][1] == {"field_name": "f", "order": "asc"}
    # custom param
    query.add_sort("f", order="asc", additional_fields={"nonexistentparam": "value1"})
    assert len(query["sort"]) == 3
    assert query["sort"][2] == {
        "field_name": "f",
        "order": "asc",
        "nonexistentparam": "value1",
    }