test_class.declarator: dataSource
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private DataSource dataSource;
test_class.type: DataSource
test_class.var_name: dataSource
test_class.declarator: connection
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Connection connection;
test_class.type: Connection
test_class.var_name: connection
test_class.declarator: dataSourceChecker
test_class.modifier: private
test_class.original_string: private AbstractDataSourceChecker dataSourceChecker;
test_class.type: AbstractDataSourceChecker
test_class.var_name: dataSourceChecker
test_class.declarator: dataSources
test_class.modifier: private
test_class.original_string: private Collection<DataSource> dataSources;
test_class.type: Collection<DataSource>
test_class.var_name: dataSources
test_class.file: shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/job/preparer/checker/AbstractDataSourceCheckerTest.java
test_class.identifier: AbstractDataSourceCheckerTest
test_case.body: @Test(expected = PrepareFailedException.class)
      public void assertCheckConnectionFailed() throws SQLException {
          when(dataSource.getConnection()).thenThrow(new SQLException("error"));
          dataSourceChecker.checkConnection(dataSources);
      }
test_case.class_method_signature: AbstractDataSourceCheckerTest.assertCheckConnectionFailed()
test_case.full_signature: @Test(expected = PrepareFailedException.class) public void assertCheckConnectionFailed()
test_case.identifier: assertCheckConnectionFailed
test_case.invocations: thenThrow when getConnection checkConnection
test_case.modifiers: @Test(expected = PrepareFailedException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertCheckConnectionFailed()
focal_class.file: shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/job/preparer/checker/AbstractDataSourceChecker.java
focal_class.identifier: AbstractDataSourceChecker
focal_class.interfaces: implements DataSourceChecker
focal_class.class_method_signature: AbstractDataSourceChecker.checkConnection(final Collection<? extends DataSource> dataSources)
focal_class.full_signature: @Override public final void checkConnection(final Collection<? extends DataSource> dataSources)
focal_class.identifier: checkConnection
focal_class.modifiers: @Override public final
focal_class.parameters: (final Collection<? extends DataSource> dataSources)
focal_class.return: void
focal_class.signature: void checkConnection(final Collection<? extends DataSource> dataSources)
focal_method.body: @Override
      public final void checkConnection(final Collection<? extends DataSource> dataSources) {
          try {
              for (DataSource each : dataSources) {
                  each.getConnection().close();
              }
          } catch (final SQLException ex) {
              throw new PrepareFailedException("Data sources can't connected!", ex);
          }
      }
focal_method.class_method_signature: AbstractDataSourceChecker.checkConnection(final Collection<? extends DataSource> dataSources)
focal_method.full_signature: @Override public final void checkConnection(final Collection<? extends DataSource> dataSources)
focal_method.identifier: checkConnection
focal_method.invocations: close getConnection
focal_method.modifiers: @Override public final
focal_method.parameters: (final Collection<? extends DataSource> dataSources)
focal_method.return: void
focal_method.signature: void checkConnection(final Collection<? extends DataSource> dataSources)