public void removeRuleData(final RuleData ruleData) {
        Optional.ofNullable(ruleData).ifPresent(data -> {
            final List<RuleData> ruleDataList = RULE_MAP.get(data.getSelectorId());
            synchronized (RULE_MAP) {
                Optional.ofNullable(ruleDataList).ifPresent(list -> list.removeIf(rule -> rule.getId().equals(data.getId())));
            }
        });
    }
@Test
    public void testRemoveRuleData() throws NoSuchFieldException, IllegalAccessException {
        RuleData ruleData = RuleData.builder().id("1").selectorId(mockSelectorId1).build();
        ConcurrentHashMap<String, List<RuleData>> ruleMap = getFieldByName(ruleMapStr);
        ruleMap.put(mockSelectorId1, Lists.newArrayList(ruleData));

        BaseDataCache.getInstance().removeRuleData(ruleData);
        assertEquals(Lists.newArrayList(), ruleMap.get(mockSelectorId1));
    }