def METHOD_NAME(expected_type: Any, provided_value: Any, default: Any, expected_response_code: int) -> None:
    test_path = "/test"
    @get(test_path)
    def test_method_with_default(param: Any = default) -> None:
        return None
    @get(test_path)
    def test_method_without_default(param: Any) -> None:
        return None
    test_method = test_method_without_default if default is ... else test_method_with_default
    # Set the type annotation of 'param' in a way mypy can deal with
    test_method.fn.value.__annotations__["param"] = expected_type
    with create_test_client(test_method) as client:
        params = urlencode({"param": provided_value}, doseq=True)
        response = client.get(f"{test_path}?{params}")
        assert response.status_code == expected_response_code