@Override
    protected void refresh(final List<RuleData> data) {
        if (CollectionUtils.isEmpty(data)) {
            LOG.info("clear all rule cache, old cache");
            data.forEach(pluginDataSubscriber::unRuleSubscribe);
            pluginDataSubscriber.refreshRuleDataAll();
        } else {
            // update cache for UpstreamCacheManager
            pluginDataSubscriber.refreshRuleDataAll();
            data.forEach(pluginDataSubscriber::onRuleSubscribe);
        }
    }
@Test
    public void testRefresh() {
        final RuleDataRefresh ruleDataRefresh = mockRuleDataRefresh;
        RuleData ruleData = new RuleData();
        List<RuleData> ruleDataList = new ArrayList<>();
        ruleDataRefresh.refresh(ruleDataList);
        ruleDataList.add(ruleData);
        ruleDataRefresh.refresh(ruleDataList);
    }