static <T> ByteBuddyProxyInvoker<T> newInstance(T proxy, Class<T> type, URL url) {
        return new ByteBuddyProxyInvoker<>(proxy, type, url, MethodInvoker.newInstance(proxy.getClass()));
    }
@Test
    void testNewInstance() throws Throwable {
        URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1");
        RemoteService proxy = Mockito.mock(RemoteService.class);
        ByteBuddyProxyInvoker<RemoteService> invoker =
                ByteBuddyProxyInvoker.newInstance(proxy, RemoteService.class, url);
        invoker.doInvoke(proxy, "sayHello", new Class[] {String.class}, new Object[] {"test"});
        Mockito.verify(proxy, Mockito.times(1)).sayHello("test");

        Assertions.assertThrows(
                IllegalArgumentException.class,
                () -> invoker.doInvoke(proxy, "equals", new Class[] {String.class}, new Object[] {"test", "test2"}));
    }