ShardingSphereJDBCScalingDataSourceConfiguration implements ScalingDataSourceConfiguration { @Override public DatabaseType getDatabaseType() { if (null == databaseType) { databaseType = DatabaseTypes.getDatabaseTypeByURL(ConfigurationYamlConverter.loadDataSourceConfigurations(dataSource).values().iterator().next().getProps().get("jdbcUrl").toString()); } return databaseType; } ShardingSphereJDBCScalingDataSourceConfiguration(final String dataSource, final String rule); @Override DatabaseType getDatabaseType();  }
@Test public void assertShardingSphereJDBCDataSourceConfigurationDatabaseType() { ShardingSphereJDBCScalingDataSourceConfiguration config = new ShardingSphereJDBCScalingDataSourceConfiguration( FixtureShardingSphereJDBCConfiguration.DATA_SOURCE, FixtureShardingSphereJDBCConfiguration.RULE); assertThat(config.getDatabaseType(), instanceOf(H2DatabaseType.class)); }