### Question:
RouteRuleGroupDao { protected void insertOrUpdate(final RouteRuleGroupModel... models) { insertOrUpdate(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 testInsertOrUpdate() { for (RouteRuleGroupModel routeRuleGroup : newRouteRuleGroups()) { routeRuleGroupDao.insertOrUpdate(routeRuleGroup); assertRouteRuleGroup(routeRuleGroup, query(routeRuleGroup)); routeRuleGroup.setUnreleasedWeight(null); routeRuleGroupDao.insertOrUpdate(routeRuleGroup); assertRouteRuleGroup(routeRuleGroup, query(routeRuleGroup)); } }