public static boolean isValidDefaultRule(DegradeRule rule) {
        if (!DegradeRuleManager.isValidRule(rule)) {
            return false;
        }
        return rule.getResource().equals(DEFAULT_KEY);
    }
@Test
    public void testIsValidRule() {
        DegradeRule rule1 = new DegradeRule("xx")
            .setCount(0.1d)
            .setGrade(RuleConstant.DEGRADE_GRADE_EXCEPTION_RATIO)
            .setTimeWindow(2);

        DegradeRule rule2 = new DegradeRule(DefaultCircuitBreakerRuleManager.DEFAULT_KEY)
            .setCount(0.1d)
            .setGrade(RuleConstant.DEGRADE_GRADE_EXCEPTION_RATIO)
            .setTimeWindow(2);

        assertFalse(DefaultCircuitBreakerRuleManager.isValidDefaultRule(rule1));
        assertTrue(DefaultCircuitBreakerRuleManager.isValidDefaultRule(rule2));
    }