public void pushWithCallback(String connectionId, ServerRequest request, PushCallBack requestCallBack,
            Executor executor) {
        Connection connection = connectionManager.getConnection(connectionId);
        if (connection != null) {
            try {
                connection.asyncRequest(request, new AbstractRequestCallBack(requestCallBack.getTimeout()) {
                    
                    @Override
                    public Executor getExecutor() {
                        return executor;
                    }
                    
                    @Override
                    public void onResponse(Response response) {
                        if (response.isSuccess()) {
                            requestCallBack.onSuccess();
                        } else {
                            requestCallBack.onFail(new NacosException(response.getErrorCode(), response.getMessage()));
                        }
                    }
                    
                    @Override
                    public void onException(Throwable e) {
                        requestCallBack.onFail(e);
                    }
                });
            } catch (ConnectionAlreadyClosedException e) {
                connectionManager.unregister(connectionId);
                requestCallBack.onSuccess();
            } catch (Exception e) {
                Loggers.REMOTE_DIGEST
                        .error("error to send push response to connectionId ={},push response={}", connectionId,
                                request, e);
                requestCallBack.onFail(e);
            }
        } else {
            requestCallBack.onSuccess();
        }
    }
@Test
    void testPushWithCallback() {
        try {
            Mockito.when(connectionManager.getConnection(Mockito.any())).thenReturn(null);
            rpcPushService.pushWithCallback(connectId, null, new PushCallBack() {
                @Override
                public long getTimeout() {
                    return 0;
                }
                
                @Override
                public void onSuccess() {
                    System.out.println("success");
                }
                
                @Override
                public void onFail(Throwable e) {
                    e.printStackTrace();
                    fail(e.getMessage());
                }
            }, null);
        } catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
    }