@Test
public void testAsyncCall() {

    CompletableFuture<String> rpcFuture = RpcContext.getContext().asyncCall(() -> {
        throw new NullPointerException();
    });
    rpcFuture.whenComplete((rpcResult, throwable) -> {
        System.out.println(throwable.toString());
        Assertions.assertNull(rpcResult);
        Assertions.assertTrue(throwable instanceof RpcException);
        Assertions.assertTrue(throwable.getCause() instanceof NullPointerException);
    });
    Assertions.assertThrows(ExecutionException.class, rpcFuture::get);
    rpcFuture = rpcFuture.exceptionally(throwable -> "mock success");
    Assertions.assertEquals("mock success", rpcFuture.join());
}