@Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
            throws IOException, ServletException {
        boolean paramCheckEnabled = ServerParamCheckConfig.getInstance().isParamCheckEnabled();
        if (!paramCheckEnabled) {
            chain.doFilter(request, response);
            return;
        }
        HttpServletRequest req = (HttpServletRequest) request;
        HttpServletResponse resp = (HttpServletResponse) response;
        try {
            Method method = methodsCache.getMethod(req);
            if (method == null) {
                chain.doFilter(req, resp);
                return;
            }
            ExtractorManager.Extractor extractor = method.getAnnotation(ExtractorManager.Extractor.class);
            if (extractor == null) {
                extractor = method.getDeclaringClass().getAnnotation(ExtractorManager.Extractor.class);
                if (extractor == null) {
                    chain.doFilter(request, response);
                    return;
                }
            }
            AbstractHttpParamExtractor httpParamExtractor = ExtractorManager.getHttpExtractor(extractor);
            List<ParamInfo> paramInfoList = httpParamExtractor.extractParam(req);
            ParamCheckerManager paramCheckerManager = ParamCheckerManager.getInstance();
            AbstractParamChecker paramChecker = paramCheckerManager.getParamChecker(ServerParamCheckConfig.getInstance().getActiveParamChecker());
            ParamCheckResponse paramCheckResponse = paramChecker.checkParamInfoList(paramInfoList);
            if (paramCheckResponse.isSuccess()) {
                chain.doFilter(req, resp);
            } else {
                Loggers.CONTROL.info("Param check invalid,{},url:{}", paramCheckResponse.getMessage(), req.getRequestURI());
                generate400Response(resp, paramCheckResponse.getMessage());
            }
        } catch (NacosException e) {
            Loggers.CONTROL.error("exception: {}", e.getMessage());
            throw new NacosRuntimeException(ErrorCode.UnKnowError.getCode(), e);
        }
        
    }
@Test
    void testDoFilterMethodNotFound() throws IOException, ServletException {
        when(methodsCache.getMethod(request)).thenReturn(null);
        filter.doFilter(request, response, chain);
        verify(chain).doFilter(request, response);
    }