private Request covertRequest(URI uri, Map<String, String> hostAndPath, Request request, String method,
            ServiceInstance serviceInstance) {
        String url = RequestInterceptorUtils.buildUrlWithIp(uri, serviceInstance,
                hostAndPath.get(HttpConstants.HTTP_URI_PATH), method);
        HttpUrl newUrl = HttpUrl.parse(url);
        return request
                .newBuilder()
                .url(newUrl)
                .method(request.method(), request.body())
                .headers(request.headers())
                .tag(request.tag())
                .build();
    }
@Test
    public void covertRequestTest() throws IOException {
        Optional<Method> method = ReflectUtils.findMethod(OkHttpClientInterceptor.class, "covertRequest",
                new Class[] {URI.class, Map.class, Request.class, String.class, ServiceInstance.class});
        Request request = createRequest(url);
        URI uri = request.uri();
        Map<String, String> hostAndPath = new HashMap<>();
        hostAndPath.put(HttpConstants.HTTP_URI_PATH, "/sayHello");
        ServiceInstance serviceInstance = new DefaultServiceInstance("127.0.0.1", "127.0.0.1", 8010,
        new HashMap<>(), "zookeeper-provider-demo");
        if (method.isPresent()) {
            Optional<Object> requestNew = ReflectUtils
                    .invokeMethod(interceptor, method.get(), new Object[] {uri, hostAndPath, request, "GET", serviceInstance});
            Assert.assertEquals(convertUrl, ((Request)requestNew.get()).uri().toString());
        }
    }