@Test
public void test03() {

    DivideShardRouteRule rule = new DivideShardRouteRule(8L, 4L);
    Map<ShardRouteInfo, List<RangeShardValue>> map = rule.groupSdValuesByRouteInfo("member", "user",
                                                                                   new RangeShardValue(2l, 7l));
    Map<ShardRouteInfo, List<RangeShardValue>> expectedResult = new LinkedHashMap<>();
    expectedResult.put(new ShardRouteInfo("member_0", "user_0"), Arrays.asList(new RangeShardValue(2l, 3l)));
    expectedResult.put(new ShardRouteInfo("member_0", "user_1"), Arrays.asList(new RangeShardValue(4l, 7l)));
    Assert.equals(map, expectedResult);
    //
    rule = new DivideShardRouteRule(null, 4L);
    map = rule.groupSdValuesByRouteInfo("member", "user", new RangeShardValue(2l, 7l));
    expectedResult = new LinkedHashMap<>();
    expectedResult.put(new ShardRouteInfo("member", "user_0"), Arrays.asList(new RangeShardValue(2l, 3l)));
    expectedResult.put(new ShardRouteInfo("member", "user_1"), Arrays.asList(new RangeShardValue(4l, 7l)));
    Assert.equals(map, expectedResult);
    //
    rule = new DivideShardRouteRule(8l, null);
    map = rule.groupSdValuesByRouteInfo("member", "user", new RangeShardValue(2l, 7l));
    expectedResult = new LinkedHashMap<>();
    expectedResult.put(new ShardRouteInfo("member_0", "user"), Arrays.asList(new RangeShardValue(2l, 7l)));
    Assert.equals(map, expectedResult);
    //
    rule = new DivideShardRouteRule(null, null);
    map = rule.groupSdValuesByRouteInfo("member", "user", new RangeShardValue(2l, 7l));
    expectedResult = new LinkedHashMap<>();
    expectedResult.put(new ShardRouteInfo("member", "user"), Arrays.asList(new RangeShardValue(2l, 7l)));
    Assert.equals(map, expectedResult);
}