@Override
    public Mono<Void> writeWith(final ServerWebExchange exchange, final ShenyuPluginChain chain) {
        return chain.execute(exchange).then(Mono.defer(() -> {
            Object result = exchange.getAttribute(Constants.RPC_RESULT);
            if (Objects.isNull(result)) {
                Object error = ShenyuResultWrap.error(exchange, ShenyuResultEnum.SERVICE_RESULT_ERROR);
                return WebFluxResultUtils.result(exchange, error);
            }
            Mono<Void> responseMono = WebFluxResultUtils.result(exchange, result);
            exchange.getAttributes().put(Constants.RESPONSE_MONO, responseMono);
            // watcher httpStatus
            final Consumer<HttpStatusCode> consumer = exchange.getAttribute(Constants.WATCHER_HTTP_STATUS);
            Optional.ofNullable(consumer).ifPresent(c -> c.accept(exchange.getResponse().getStatusCode()));
            return responseMono;
        }));
    }
@Test
    public void testExecuteWithResult() {
        String response = "{}";
        exchange.getAttributes().put(Constants.RPC_RESULT, response);
        StepVerifier.create(rpcMessageWriter.writeWith(exchange, chain)).expectSubscription().verifyComplete();
    }