public static void checkContextPath(String contextPath) {
        if (contextPath == null) {
            return;
        }
        Matcher matcher = CONTEXT_PATH_MATCH.matcher(contextPath);
        if (matcher.find()) {
            throw new IllegalArgumentException("Illegal url path expression");
        }
    }
@Test
    void testContextPathLegal() {
        String contextPath1 = "/nacos";
        ValidatorUtils.checkContextPath(contextPath1);
        String contextPath2 = "nacos";
        ValidatorUtils.checkContextPath(contextPath2);
        String contextPath3 = "/";
        ValidatorUtils.checkContextPath(contextPath3);
        String contextPath4 = "";
        ValidatorUtils.checkContextPath(contextPath4);
        // allow null
        ValidatorUtils.checkContextPath(null);
    }