@Test
    public void testSync() throws InterruptedException {
        Object obj = null;
        try {
            final RequestBody bd = new RequestBody(8, "Hello world!");
            logger.info("client last sync invoke! =========" + bd.getId());
            obj = client.invokeSync(addr, bd, 3000);
            Assert.fail("Should not reach here!");
        } catch (InvokeServerBusyException e) {
            Assert.assertNull(obj);
        } catch (RemotingException e) {
            logger.error("Other RemotingException but InvokeServerBusyException 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!");
        }
    }
@author jiangping
@version $Id: ServerBusyTest.java, v 0.1 2015-10-20 PM2:48:57 tao Exp $
src/test/java/com/alipay/remoting/rpc/exception/ServerBusyTest.java