@BeforeEach
    public void setup() {
        ConfigurableApplicationContext applicationContext = mock(ConfigurableApplicationContext.class);
        when(applicationContext.getBean(ShenyuResult.class)).thenReturn(mock(ShenyuResult.class));
        SpringBeanUtils springBeanUtils = SpringBeanUtils.getInstance();
        springBeanUtils.setApplicationContext(applicationContext);
        Map<String, MessageWriter> writerMap = new HashMap<>();
        MessageWriter messageWriter = mock(MessageWriter.class);
        when(messageWriter.writeWith(any(), any())).thenReturn(Mono.empty());
        writerMap.put(RpcTypeEnum.HTTP.getName(), messageWriter);
        writerMap.put(RpcTypeEnum.DUBBO.getName(), messageWriter);
        writerMap.put(RpcTypeEnum.SOFA.getName(), messageWriter);
        writerMap.put(RpcTypeEnum.GRPC.getName(), messageWriter);
        writerMap.put(RpcTypeEnum.MOTAN.getName(), messageWriter);
        writerMap.put(RpcTypeEnum.TARS.getName(), messageWriter);
        responsePlugin = new ResponsePlugin(writerMap);
    }
The test case for {@link ResponsePlugin}.
shenyu-plugin/shenyu-plugin-response/src/test/java/org/apache/shenyu/plugin/response/ResponsePluginTest.java