def METHOD_NAME(serve_asgi_adapter):
    router = Router()
    def _handler(request: WebSocketRequest, request_args: dict):
        with request.accept() as ws:
            ws.send("foo")
            ws.send(f"id={request_args['id']}")
    router.add("/foo/<id>", _handler)
    server = serve_asgi_adapter(
        wsgi_app=None,
        websocket_listener=WebSocketRequest.listener(router.dispatch),
    )
    client = websocket.WebSocket()
    client.connect(server.url.replace("http://", "ws://") + "/foo/bar")
    assert client.recv() == "foo"
    assert client.recv() == "id=bar"