### Question:
RouteRuleGroupDao { protected void publish(final RouteRuleGroupModel... models) { publish(Lists.newArrayList(models)); }  List<RouteRuleGroupModel> query(); RouteRuleGroupModel generateGroup(RouteRuleGroupModel routeRuleGroup); List<RouteRuleGroupModel> select(RouteRuleGroupModel filter); List<RouteRuleGroupModel> select(List<Long> groupIds); static final RouteRuleGroupDao INSTANCE; }### Answer:
@Test public void testPublish() { for (RouteRuleGroupModel routeRuleGroup : newRouteRuleGroups()) { routeRuleGroupDao.publish(routeRuleGroup); RouteRuleGroupModel published = query(routeRuleGroup); Assert.assertEquals(routeRuleGroup.getRouteRuleId(), published.getRouteRuleId()); Assert.assertEquals(routeRuleGroup.getGroupId(), published.getGroupId()); Assert.assertEquals(null, published.getUnreleasedWeight()); Assert.assertEquals(routeRuleGroup.getWeight(), published.getWeight()); } }