public void updateServiceRule(String serviceName, List<EntireRule> entireRules) {
        Map<String, List<Rule>> flowRules = rules.computeIfAbsent(RouterConstant.FLOW_MATCH_KIND,
                key -> new ConcurrentHashMap<>());
        flowRules.remove(serviceName);
        Map<String, List<Rule>> tagRules = rules.computeIfAbsent(RouterConstant.TAG_MATCH_KIND,
                key -> new ConcurrentHashMap<>());
        tagRules.remove(serviceName);
        Map<String, List<Rule>> laneRules = rules.computeIfAbsent(RouterConstant.LANE_MATCH_KIND,
                key -> new ConcurrentHashMap<>());
        laneRules.remove(serviceName);
        for (EntireRule entireRule : entireRules) {
            if (RouterConstant.FLOW_MATCH_KIND.equals(entireRule.getKind())) {
                flowRules.putIfAbsent(serviceName, entireRule.getRules());
                LOGGER.info(String.format(Locale.ROOT, "Flow match rule for %s has been updated: %s ", serviceName,
                        JSONObject.toJSONString(entireRule.getRules())));
                continue;
            }
            if (RouterConstant.TAG_MATCH_KIND.equals(entireRule.getKind())) {
                tagRules.putIfAbsent(serviceName, entireRule.getRules());
                LOGGER.info(String.format(Locale.ROOT, "Tag match rule for %s has been updated: %s ", serviceName,
                        JSONObject.toJSONString(entireRule.getRules())));
                continue;
            }
            if (RouterConstant.LANE_MATCH_KIND.equals(entireRule.getKind())) {
                laneRules.putIfAbsent(serviceName, entireRule.getRules());
                LOGGER.info(String.format(Locale.ROOT, "Lane match rule for %s has been updated: %s ", serviceName,
                        JSONObject.toJSONString(entireRule.getRules())));
            }
        }
    }
@Test
    public void testUpdateServiceRule() {
        List<EntireRule> entireRules = new ArrayList<>();
        EntireRule flowMatchRule = new EntireRule();
        flowMatchRule.setKind(RouterConstant.FLOW_MATCH_KIND);
        flowMatchRule.setDescription("flow match rule");
        flowMatchRule.setRules(new ArrayList<>());
        EntireRule tagMatchRule = new EntireRule();
        tagMatchRule.setKind(RouterConstant.TAG_MATCH_KIND);
        tagMatchRule.setDescription("tag match rule");
        tagMatchRule.setRules(new ArrayList<>());
        EntireRule laneMatchRule = new EntireRule();
        laneMatchRule.setKind(RouterConstant.LANE_MATCH_KIND);
        laneMatchRule.setDescription("lane match rule");
        laneMatchRule.setRules(new ArrayList<>());
        entireRules.add(flowMatchRule);
        entireRules.add(tagMatchRule);
        entireRules.add(laneMatchRule);
        routerConfiguration.updateServiceRule("testService", entireRules);
        Assert.assertEquals(3, routerConfiguration.getRouteRule().size());
    }