public static void loadRules(List<ParamFlowRule> rules) {
        try {
            currentProperty.updateValue(rules);
        } catch (Throwable e) {
            RecordLog.info("[ParamFlowRuleManager] Failed to load rules", e);
        }
    }
@Test
    public void testLoadParamRulesClearingUnusedMetrics() {
        final String resA = "resA";
        ParamFlowRule ruleA = new ParamFlowRule(resA)
            .setCount(1)
            .setParamIdx(0);
        ParamFlowRuleManager.loadRules(Collections.singletonList(ruleA));
        ParameterMetricStorage.getMetricsMap().put(resA, new ParameterMetric());
        assertNotNull(ParameterMetricStorage.getParamMetricForResource(resA));

        final String resB = "resB";
        ParamFlowRule ruleB = new ParamFlowRule(resB)
            .setCount(2)
            .setParamIdx(1);
        ParamFlowRuleManager.loadRules(Collections.singletonList(ruleB));
        assertNull("The unused hot param metric should be cleared",
            ParameterMetricStorage.getParamMetricForResource(resA));
    }