@Override
    public void asyncRequest(Request request, final RequestCallBack requestCallBack) throws NacosException {
        Payload grpcRequest = GrpcUtils.convert(request);
        ListenableFuture<Payload> requestFuture = grpcFutureServiceStub.request(grpcRequest);
        
        //set callback .
        Futures.addCallback(requestFuture, new FutureCallback<Payload>() {
            @Override
            public void onSuccess(@Nullable Payload grpcResponse) {
                Response response = (Response) GrpcUtils.parse(grpcResponse);
                
                if (response != null) {
                    if (response instanceof ErrorResponse) {
                        requestCallBack.onException(new NacosException(response.getErrorCode(), response.getMessage()));
                    } else {
                        requestCallBack.onResponse(response);
                    }
                } else {
                    requestCallBack.onException(new NacosException(ResponseCode.FAIL.getCode(), "response is null"));
                }
            }
            
            @Override
            public void onFailure(Throwable throwable) {
                if (throwable instanceof CancellationException) {
                    requestCallBack.onException(
                            new TimeoutException("Timeout after " + requestCallBack.getTimeout() + " milliseconds."));
                } else {
                    requestCallBack.onException(throwable);
                }
            }
        }, requestCallBack.getExecutor() != null ? requestCallBack.getExecutor() : this.executor);
        // set timeout future.
        ListenableFuture<Payload> payloadListenableFuture = Futures.withTimeout(requestFuture,
                requestCallBack.getTimeout(), TimeUnit.MILLISECONDS, RpcScheduledExecutor.TIMEOUT_SCHEDULER);
        
    }
@Test
    void testAsyncRequestWithOtherException() throws NacosException, ExecutionException, InterruptedException {
        when(future.get()).thenThrow(new RuntimeException("test"));
        doAnswer(invocationOnMock -> {
            ((Runnable) invocationOnMock.getArgument(0)).run();
            return null;
        }).when(future).addListener(any(Runnable.class), eq(executor));
        RequestCallBack requestCallBack = mock(RequestCallBack.class);
        connection.asyncRequest(new HealthCheckRequest(), requestCallBack);
        verify(requestCallBack).onException(any(RuntimeException.class));
    }