@Test
public void testLocateTableShards() {

    HintsStrategy test = new HintsStrategy();
    Map<String, String> settings = new HashMap<>();
    settings.put(HintsStrategy.SHARD_BY_TABLE, "true");
    
    Set<String> shardedTables = new HashSet<>();
    shardedTables.add("t1");
    shardedTables.add("t2");
    shardedTables.add("T1");
    shardedTables.add("T2");
    test.initialize(settings);
    assertTrue(test.isShardByTable());
    assertEquals(0, test.locateTableShards(new TableShardingContext("appId", "logicDbName", "t1", set("1", "2", "3"), new Hints(), ConditionList.andList())).size());
    assertEquals(set("1"), test.locateTableShards(new TableShardingContext("appId", "logicDbName", "t1", set("1", "2", "3"), new Hints().inTableShard(1), ConditionList.andList())));
    assertEquals(set("1"), test.locateTableShards(new TableShardingContext("appId", "logicDbName", "t1", set("1", "2", "3"), new Hints().inTableShard("1"), ConditionList.andList())));
}