@BeforeEach
    public void setUp() {
        ConfigurableApplicationContext applicationContext = mock(ConfigurableApplicationContext.class);
        when(applicationContext.getBean(ShenyuResult.class)).thenReturn(new DefaultShenyuResult());
        SpringBeanUtils springBeanUtils = SpringBeanUtils.getInstance();
        springBeanUtils.setApplicationContext(applicationContext);
        exchange = MockServerWebExchange.from(MockServerHttpRequest.get("localhost").build());
        rpcMessageWriter = new RPCMessageWriter();
        Mockito.when(chain.execute(exchange)).thenReturn(Mono.empty());
    }
The Test Case For {@link RPCMessageWriter}.
shenyu-plugin/shenyu-plugin-response/src/test/java/org/apache/shenyu/plugin/response/strategy/RPCMessageWriterTest.java