@Test
    public void testSyncOK() {
        RequestBody b1 = new RequestBody(1, "Hello world!");
        try {
            client.invokeSync(addr, b1, timeout + 500);
        } catch (InvokeTimeoutException e) {
            Assert.fail("Should not reach here!");
        } catch (RemotingException e) {
            logger.error("Other RemotingException but InvokeTimeoutException occurred in sync", e);
            Assert.fail("Should not reach here!");
        } catch (InterruptedException e) {
            logger.error("InterruptedException in sync", e);
            Assert.fail("Should not reach here!");
        }
    }
Timeout Test

@author xiaomin.cxm
@version $Id: TimeoutTest.java, v 0.1 Apr 8, 2016 4:31:10 PM xiaomin.cxm Exp $
src/test/java/com/alipay/remoting/rpc/timeout/TimeoutTest.java