shardConfigs.add(new ShardConfigurationImpl(1, sqlMapper_1.getConfiguration()
.getEnvironment().getDataSource(), sqlMapper_1));
shardConfigs.add(new ShardConfigurationImpl(2, sqlMapper_2.getConfiguration()
.getEnvironment().getDataSource(), sqlMapper_2));
factory = new ShardedSqlSessionFactoryBuilder().build(shardConfigs,
new UserShardStrategyFactory());
Assert.assertNotNull(factory);
factory = new ShardedSqlSessionFactoryBuilder().build(shardConfigs,
new ShardStrategyFactory() {
@Override
public ShardStrategy newShardStrategy(List<ShardId> shardIds) {
ShardSelectionStrategy pss = new ShardSelectionStrategy() {