test_class.declarator: TABLE_TYPE = "TABLE"
test_class.modifier: private static final
test_class.original_string: private static final String TABLE_TYPE = "TABLE";
test_class.type: String
test_class.var_name: TABLE_TYPE
test_class.file: shardingsphere-jdbc/shardingsphere-jdbc-governance/src/test/java/org/apache/shardingsphere/driver/governance/api/GovernanceShardingSphereDataSourceFactoryTest.java
test_class.identifier: GovernanceShardingSphereDataSourceFactoryTest
test_case.body: @Test
      public void assertCreateDataSourceWithGivenDataSource() throws SQLException {
          DataSource dataSource = GovernanceShardingSphereDataSourceFactory.createDataSource(createDataSource(), Collections.singletonList(mock(RuleConfiguration.class)),
                  new Properties(), createGovernanceConfiguration());
          assertTrue(dataSource instanceof GovernanceShardingSphereDataSource);
      }
test_case.class_method_signature: GovernanceShardingSphereDataSourceFactoryTest.assertCreateDataSourceWithGivenDataSource()
test_case.full_signature: @Test public void assertCreateDataSourceWithGivenDataSource()
test_case.identifier: assertCreateDataSourceWithGivenDataSource
test_case.invocations: createDataSource createDataSource singletonList mock createGovernanceConfiguration assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertCreateDataSourceWithGivenDataSource()
focal_class.file: shardingsphere-jdbc/shardingsphere-jdbc-governance/src/main/java/org/apache/shardingsphere/driver/governance/api/GovernanceShardingSphereDataSourceFactory.java
focal_class.identifier: GovernanceShardingSphereDataSourceFactory
focal_class.class_method_signature: GovernanceShardingSphereDataSourceFactory.createDataSource(final Map<String, DataSource> dataSourceMap, final Collection<RuleConfiguration> ruleConfigurations,
                                                final Properties props, final GovernanceConfiguration governanceConfig)
focal_class.full_signature: public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final Collection<RuleConfiguration> ruleConfigurations,
                                                final Properties props, final GovernanceConfiguration governanceConfig)
focal_class.identifier: createDataSource
focal_class.modifiers: public static
focal_class.parameters: (final Map<String, DataSource> dataSourceMap, final Collection<RuleConfiguration> ruleConfigurations,
                                                final Properties props, final GovernanceConfiguration governanceConfig)
focal_class.return: DataSource
focal_class.signature: DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final Collection<RuleConfiguration> ruleConfigurations,
                                                final Properties props, final GovernanceConfiguration governanceConfig)
focal_class.class_method_signature: GovernanceShardingSphereDataSourceFactory.createDataSource(final DataSource dataSource, final Collection<RuleConfiguration> ruleConfigurations,
                                                final Properties props, final GovernanceConfiguration governanceConfig)
focal_class.full_signature: public static DataSource createDataSource(final DataSource dataSource, final Collection<RuleConfiguration> ruleConfigurations,
                                                final Properties props, final GovernanceConfiguration governanceConfig)
focal_class.identifier: createDataSource
focal_class.modifiers: public static
focal_class.parameters: (final DataSource dataSource, final Collection<RuleConfiguration> ruleConfigurations,
                                                final Properties props, final GovernanceConfiguration governanceConfig)
focal_class.return: DataSource
focal_class.signature: DataSource createDataSource(final DataSource dataSource, final Collection<RuleConfiguration> ruleConfigurations,
                                                final Properties props, final GovernanceConfiguration governanceConfig)
focal_class.class_method_signature: GovernanceShardingSphereDataSourceFactory.createDataSource(final GovernanceConfiguration governanceConfig)
focal_class.full_signature: public static DataSource createDataSource(final GovernanceConfiguration governanceConfig)
focal_class.identifier: createDataSource
focal_class.modifiers: public static
focal_class.parameters: (final GovernanceConfiguration governanceConfig)
focal_class.return: DataSource
focal_class.signature: DataSource createDataSource(final GovernanceConfiguration governanceConfig)
focal_method.body: public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final Collection<RuleConfiguration> ruleConfigurations,
                                                final Properties props, final GovernanceConfiguration governanceConfig) throws SQLException {
          if (null == ruleConfigurations || ruleConfigurations.isEmpty()) {
              return createDataSource(governanceConfig);
          }
          return new GovernanceShardingSphereDataSource(dataSourceMap, ruleConfigurations, props, governanceConfig);
      }
focal_method.class_method_signature: GovernanceShardingSphereDataSourceFactory.createDataSource(final Map<String, DataSource> dataSourceMap, final Collection<RuleConfiguration> ruleConfigurations,
                                                final Properties props, final GovernanceConfiguration governanceConfig)
focal_method.full_signature: public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final Collection<RuleConfiguration> ruleConfigurations,
                                                final Properties props, final GovernanceConfiguration governanceConfig)
focal_method.identifier: createDataSource
focal_method.invocations: isEmpty createDataSource
focal_method.modifiers: public static
focal_method.parameters: (final Map<String, DataSource> dataSourceMap, final Collection<RuleConfiguration> ruleConfigurations,
                                                final Properties props, final GovernanceConfiguration governanceConfig)
focal_method.return: DataSource
focal_method.signature: DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final Collection<RuleConfiguration> ruleConfigurations,
                                                final Properties props, final GovernanceConfiguration governanceConfig)