def METHOD_NAME(
    app_before_request_handler: Optional[BeforeRequestHookHandler],
    router_before_request_handler: Optional[BeforeRequestHookHandler],
    controller_before_request_handler: Optional[BeforeRequestHookHandler],
    method_before_request_handler: Optional[BeforeRequestHookHandler],
    expected: dict,
) -> None:
    class MyController(Controller):
        path = "/hello"
        before_request = controller_before_request_handler
        @get(before_request=method_before_request_handler)
        def hello(self) -> dict:
            return {"hello": "world"}
    router = Router(path="/greetings", route_handlers=[MyController], before_request=router_before_request_handler)
    with create_test_client(route_handlers=router, before_request=app_before_request_handler) as client:
        response = client.get("/greetings/hello")
        assert response.json() == expected