@Test
public void test04() {

    SpelShardRouteRule strRule = new SpelShardRouteRule("{scName}_{format('%02d', sdValue.hashCode() % 4)}",
                                                        "{tbName}_{format('%04d', sdValue.hashCode() % 16)}");
    Map<ShardRouteInfo, List<RangeShardValue>> map = strRule.groupSdValuesByRouteInfo("db", "user",
                                                                                      new RangeShardValue(0L, 31L));
    Map<ShardRouteInfo, List<RangeShardValue>> r = new LinkedHashMap<>();
    r.put(new ShardRouteInfo("db_00", "user_0000"),
          Arrays.asList(new RangeShardValue(0L, 0L), new RangeShardValue(16L, 16L)));
    r.put(new ShardRouteInfo("db_01", "user_0001"),
          Arrays.asList(new RangeShardValue(1L, 1L), new RangeShardValue(17L, 17L)));
    r.put(new ShardRouteInfo("db_02", "user_0002"),
          Arrays.asList(new RangeShardValue(2L, 2L), new RangeShardValue(18L, 18L)));
    r.put(new ShardRouteInfo("db_03", "user_0003"),
          Arrays.asList(new RangeShardValue(3L, 3L), new RangeShardValue(19L, 19L)));
    r.put(new ShardRouteInfo("db_00", "user_0004"),
          Arrays.asList(new RangeShardValue(4L, 4L), new RangeShardValue(20L, 20L)));
    r.put(new ShardRouteInfo("db_01", "user_0005"),
          Arrays.asList(new RangeShardValue(5L, 5L), new RangeShardValue(21L, 21L)));
    r.put(new ShardRouteInfo("db_02", "user_0006"),
          Arrays.asList(new RangeShardValue(6L, 6L), new RangeShardValue(22L, 22L)));
    r.put(new ShardRouteInfo("db_03", "user_0007"),
          Arrays.asList(new RangeShardValue(7L, 7L), new RangeShardValue(23L, 23L)));
    r.put(new ShardRouteInfo("db_00", "user_0008"),
          Arrays.asList(new RangeShardValue(8L, 8L), new RangeShardValue(24L, 24L)));
    r.put(new ShardRouteInfo("db_01", "user_0009"),
          Arrays.asList(new RangeShardValue(9L, 9L), new RangeShardValue(25L, 25L)));
    r.put(new ShardRouteInfo("db_02", "user_0010"),
          Arrays.asList(new RangeShardValue(10L, 10L), new RangeShardValue(26L, 26L)));
    r.put(new ShardRouteInfo("db_03", "user_0011"),
          Arrays.asList(new RangeShardValue(11L, 11L), new RangeShardValue(27L, 27L)));
    r.put(new ShardRouteInfo("db_00", "user_0012"),
          Arrays.asList(new RangeShardValue(12L, 12L), new RangeShardValue(28L, 28L)));
    r.put(new ShardRouteInfo("db_01", "user_0013"),
          Arrays.asList(new RangeShardValue(13L, 13L), new RangeShardValue(29L, 29L)));
    r.put(new ShardRouteInfo("db_02", "user_0014"),
          Arrays.asList(new RangeShardValue(14L, 14L), new RangeShardValue(30L, 30L)));
    r.put(new ShardRouteInfo("db_03", "user_0015"),
          Arrays.asList(new RangeShardValue(15L, 15L), new RangeShardValue(31L, 31L)));
    Assert.equals(map, r);
}