// Path: zing-demo/src/main/java/org/zxc/zing/demo/api/DemoService.java
// public interface DemoService {
//     String echo(String input);
//     MessageDTO loadObject(int messageId);
// }
// 
// Path: zing-demo/src/main/java/org/zxc/zing/demo/api/MessageDTO.java
// public class MessageDTO implements Serializable{
//     private int messageId;
//     private String content;
// 
//     public int getMessageId() {
//         return messageId;
//     }
// 
//     public void setMessageId(int messageId) {
//         this.messageId = messageId;
//     }
// 
//     public String getContent() {
//         return content;
//     }
// 
//     public void setContent(String content) {
//         this.content = content;
//     }
// 
//     @Override
//     public String toString() {
//         final StringBuilder sb = new StringBuilder("MessageDTO{");
//         sb.append("messageId=").append(messageId);
//         sb.append(", content='").append(content).append('\'');
//         sb.append('}');
//         return sb.toString();
//     }
// }


import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.zxc.zing.demo.api.DemoService;
import org.zxc.zing.demo.api.MessageDTO;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
package org.zxc.zing.demo.test.client;



/**
 * Created by xuanchen.zhao on 15-12-11.
 */
public class DemoClientTest {

    private static DemoService demoService;

    public static void main(String[] args) throws InterruptedException {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath*:config/spring/applicationContext-client.xml");
        demoService = (DemoService) context.getBean("demoService");
        test();
        testLoadMessageObject();
        testBatchInvocation();
    }

    public static void test() throws InterruptedException {
        String result = demoService.echo("Hello World!");
        System.out.println(result);
    }

    public static void testLoadMessageObject(){
// Path: zing-demo/src/main/java/org/zxc/zing/demo/api/DemoService.java
// public interface DemoService {
//     String echo(String input);
//     MessageDTO loadObject(int messageId);
// }
// 
// Path: zing-demo/src/main/java/org/zxc/zing/demo/api/MessageDTO.java
// public class MessageDTO implements Serializable{
//     private int messageId;
//     private String content;
// 
//     public int getMessageId() {
//         return messageId;
//     }
// 
//     public void setMessageId(int messageId) {
//         this.messageId = messageId;
//     }
// 
//     public String getContent() {
//         return content;
//     }
// 
//     public void setContent(String content) {
//         this.content = content;
//     }
// 
//     @Override
//     public String toString() {
//         final StringBuilder sb = new StringBuilder("MessageDTO{");
//         sb.append("messageId=").append(messageId);
//         sb.append(", content='").append(content).append('\'');
//         sb.append('}');
//         return sb.toString();
//     }
// }


// Path: zing-demo/src/main/java/org/zxc/zing/demo/test/client/DemoClientTest.java
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.zxc.zing.demo.api.DemoService;
import org.zxc.zing.demo.api.MessageDTO;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

package org.zxc.zing.demo.test.client;



/**
 * Created by xuanchen.zhao on 15-12-11.
 */
public class DemoClientTest {

    private static DemoService demoService;

    public static void main(String[] args) throws InterruptedException {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath*:config/spring/applicationContext-client.xml");
        demoService = (DemoService) context.getBean("demoService");
        test();
        testLoadMessageObject();
        testBatchInvocation();
    }

    public static void test() throws InterruptedException {
        String result = demoService.echo("Hello World!");
        System.out.println(result);
    }

    public static void testLoadMessageObject(){
        MessageDTO messageDTO = demoService.loadObject(1);