code: def test_trailing_slash(mock_longest_prefix_router):
      router = mock_longest_prefix_router
      router.update_routes(
          {
              EndpointTag("endpoint", "default"): EndpointInfo(
                  route="/test"
              )
          }
      )
  
      route, handle, _ = get_handle_function(router)("/test/")
      assert route == "/test" and handle == "endpoint"
  
      router.update_routes(
          {
              EndpointTag("endpoint", "default"): EndpointInfo(
                  route="/test/"
              )
          }
      )
  
      assert get_handle_function(router)("/test") is None
  
file_path: ray/python/ray/serve/tests/test_proxy_router.py
imports: from typing import Callable
  import pytest
  from ray.serve._private.common import EndpointInfo, EndpointTag, RequestProtocol
  from ray.serve._private.proxy_router import EndpointRouter, LongestPrefixRouter, ProxyRouter
label_desc: Use image node_id 6 for calling a global function with example usage: test_trailing_slash(mock_longest_prefix_router) without return types