@Test
public void testRemoteApplicationName() {

    URL url = URL.valueOf("rest://127.0.0.1:" + NetUtils.getAvailablePort() + "/rest/say?version=1.0.0&interface=org.apache.dubbo.rpc.protocol.rest.DemoService").addParameter("application", "consumer");
    DemoServiceImpl server = new DemoServiceImpl();
    this.registerProvider(url, server, DemoService.class);
    Exporter<DemoService> exporter = protocol.export(proxy.getInvoker(server, DemoService.class, url));
    Invoker<DemoService> invoker = protocol.refer(DemoService.class, url);
    DemoService client = proxy.getProxy(invoker);
    String result = client.getRemoteApplicationName();
    Assertions.assertEquals("consumer", result);
    invoker.destroy();
    exporter.unexport();
}