### Question:
ShardingDataSourceFactory { public static DataSource createDataSource(final ShardingRule shardingRule) { return new ShardingDataSource(shardingRule); }  static DataSource createDataSource(final ShardingRule shardingRule); static DataSource createDataSource(final ShardingRule shardingRule, final Properties props);  }### Answer:
@Test public void assertCreateDataSourceWithShardingRuleOnly() throws SQLException, NoSuchFieldException, IllegalAccessException { ShardingRule shardingRule = createShardingRule(); assertThat(getShardingRule(ShardingDataSourceFactory.createDataSource(shardingRule)), is(shardingRule)); }
@Test public void assertCreateDataSourceWithShardingRuleAndProperties() throws SQLException, NoSuchFieldException, IllegalAccessException { ShardingRule shardingRule = createShardingRule(); Properties props = new Properties(); DataSource dataSource = ShardingDataSourceFactory.createDataSource(shardingRule, props); assertThat(getShardingRule(dataSource), is(shardingRule)); assertThat(getShardingProperties(dataSource), is(props)); }