@Override
    public void onRuleChanged(final List<RuleData> changed, final DataEventTypeEnum eventType) {
        if (CollectionUtils.isEmpty(changed)) {
            return;
        }
        LOG.info("onRuleChanged, changed:{}, eventType:{}", JsonUtils.toJson(changed), JsonUtils.toJson(eventType));
        this.updateRuleCache();
        this.afterRuleChanged(changed, eventType);
    }
@Test
    public void testOnRuleChanged() {
        List<RuleData> empty = Lists.newArrayList();
        DataEventTypeEnum eventType = mock(DataEventTypeEnum.class);
        listener.onRuleChanged(empty, eventType);
        assertFalse(listener.getCache().containsKey(ConfigGroupEnum.RULE.name()));
        List<RuleData> ruleDatas = Lists.newArrayList(mock(RuleData.class));
        listener.onRuleChanged(ruleDatas, eventType);
        assertTrue(listener.getCache().containsKey(ConfigGroupEnum.RULE.name()));
    }