@Test
public void testLocateDbShards() {

    HintsStrategy test = new HintsStrategy();
    Map<String, String> settings = new HashMap<>();
    settings.put(HintsStrategy.SHARD_BY_DB, "true");
    test.initialize(settings);
    assertTrue(test.isShardByDb());
    assertTrue(test.locateDbShards(new ShardingContext("appId", "logicDbName", set("1", "2", "3"), new Hints(), ConditionList.andList())).size() == 0);
    assertEquals(set("1"), test.locateDbShards(new ShardingContext("appId", "logicDbName", set("1", "2", "3"), new Hints().inShard(1), ConditionList.andList())));
    assertEquals(set("1"), test.locateDbShards(new ShardingContext("appId", "logicDbName", set("1", "2", "3"), new Hints().inShard("1"), ConditionList.andList())));
}