@Test
    public void testFutureWithShorterOrJustTheSameTime() {
        RequestBody b4 = new RequestBody(4, "Hello world!");
        Object obj = null;
        try {
            RpcResponseFuture future = client.invokeWithFuture(addr, b4, timeout);
            obj = future.get(timeout - 50);
            Assert.fail("Should not reach here!");
        } catch (InvokeTimeoutException e) {
            Assert.assertNull(obj);
        } catch (RemotingException e) {
            logger.error("Should not catch any exception here", e);
            Assert.fail("Should not reach here!");
        } catch (InterruptedException e) {
            logger.error("InterruptedException in sync", e);
            Assert.fail("Should not reach here!");
        }

    }
future try to get result wait a shorter time or just the same with specified timeout in invokeWithFuture
src/test/java/com/alipay/remoting/rpc/timeout/TimeoutTest.java