class DemoMeshClient {

    public static void main(String[] args) throws Throwable {<FILL_FUNCTION_BODY>}

// agent yaml配置样例参考：
//motan-agent:
//  application: agent-test
//motan-registry:
//  direct-registry:
//    protocol: direct
//    host: localhost
//    port: 8002
//motan-refer:
//  test-demo:
//    registry: direct-registry
//    path: com.weibo.motan.demo.service.MotanDemoService
//    group: motan-demo-rpc
}

        //使用MeshClient需要先部署mesh agent(可以参考https://github.com/weibocom/motan-go)。
        // 在mesh agent中已经配置好对应的服务。
        ApplicationContext ctx = new ClassPathXmlApplicationContext(new String[]{"classpath:demo_mesh_client.xml"});
        MotanDemoService service = (MotanDemoService) ctx.getBean("refererWithMeshClient");
        System.out.println(service.hello("motan"));

        // 直接使用 MeshClient
        MeshClient client = (MeshClient) ctx.getBean("testMeshClient");
        Request request = MotanClientUtil.buildRequest("com.weibo.motan.demo.service.MotanDemoService",
                "hello", new Object[]{"motan"}, null);
        // sync call
        System.out.println(client.call(request, String.class));

        // async call
        System.out.println(client.asyncCall(request, String.class).getValue());
        System.exit(0);
    
<no_super_class>