test_class.declarator: xaDataSource
test_class.modifier: private
test_class.original_string: private XADataSource xaDataSource;
test_class.type: XADataSource
test_class.var_name: xaDataSource
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.file: shardingsphere-transaction/shardingsphere-transaction-2pc/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/test/java/org/apache/shardingsphere/transaction/xa/jta/connection/dialect/MySQLXAConnectionWrapperTest.java
test_class.identifier: MySQLXAConnectionWrapperTest
test_case.body: @Test
      public void assertCreateMySQLConnection() throws SQLException {
          XAConnection actual = new MySQLXAConnectionWrapper().wrap(xaDataSource, connection);
          assertThat(actual.getXAResource(), instanceOf(XAResource.class));
          assertThat(actual.getConnection(), instanceOf(Connection.class));
      }
test_case.class_method_signature: MySQLXAConnectionWrapperTest.assertCreateMySQLConnection()
test_case.full_signature: @Test public void assertCreateMySQLConnection()
test_case.identifier: assertCreateMySQLConnection
test_case.invocations: wrap assertThat getXAResource instanceOf assertThat getConnection instanceOf
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertCreateMySQLConnection()
focal_class.declarator: MYSQL_XA_DATASOURCE_5 = "com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"
focal_class.modifier: private static final
focal_class.original_string: private static final String MYSQL_XA_DATASOURCE_5 = "com.mysql.jdbc.jdbc2.optional.MysqlXADataSource";
focal_class.type: String
focal_class.var_name: MYSQL_XA_DATASOURCE_5
focal_class.declarator: MYSQL_XA_DATASOURCE_8 = "com.mysql.cj.jdbc.MysqlXADataSource"
focal_class.modifier: private static final
focal_class.original_string: private static final String MYSQL_XA_DATASOURCE_8 = "com.mysql.cj.jdbc.MysqlXADataSource";
focal_class.type: String
focal_class.var_name: MYSQL_XA_DATASOURCE_8
focal_class.file: shardingsphere-transaction/shardingsphere-transaction-2pc/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/connection/dialect/MySQLXAConnectionWrapper.java
focal_class.identifier: MySQLXAConnectionWrapper
focal_class.interfaces: implements XAConnectionWrapper
focal_class.class_method_signature: MySQLXAConnectionWrapper.wrap(final XADataSource xaDataSource, final Connection connection)
focal_class.full_signature: @SneakyThrows(ReflectiveOperationException.class) @Override public XAConnection wrap(final XADataSource xaDataSource, final Connection connection)
focal_class.identifier: wrap
focal_class.modifiers: @SneakyThrows(ReflectiveOperationException.class) @Override public
focal_class.parameters: (final XADataSource xaDataSource, final Connection connection)
focal_class.return: XAConnection
focal_class.signature: XAConnection wrap(final XADataSource xaDataSource, final Connection connection)
focal_class.class_method_signature: MySQLXAConnectionWrapper.unwrapPhysicalConnection(final String xaDataSourceClassName, final Connection connection)
focal_class.full_signature: @SneakyThrows({SQLException.class, ClassNotFoundException.class}) private Connection unwrapPhysicalConnection(final String xaDataSourceClassName, final Connection connection)
focal_class.identifier: unwrapPhysicalConnection
focal_class.modifiers: @SneakyThrows({SQLException.class, ClassNotFoundException.class}) private
focal_class.parameters: (final String xaDataSourceClassName, final Connection connection)
focal_class.return: Connection
focal_class.signature: Connection unwrapPhysicalConnection(final String xaDataSourceClassName, final Connection connection)
focal_method.body: @SneakyThrows(ReflectiveOperationException.class)
      @Override
      public XAConnection wrap(final XADataSource xaDataSource, final Connection connection) {
          Connection physicalConnection = unwrapPhysicalConnection(xaDataSource.getClass().getName(), connection);
          Method method = xaDataSource.getClass().getDeclaredMethod("wrapConnection", Connection.class);
          method.setAccessible(true);
          return (XAConnection) method.invoke(xaDataSource, physicalConnection);
      }
focal_method.class_method_signature: MySQLXAConnectionWrapper.wrap(final XADataSource xaDataSource, final Connection connection)
focal_method.full_signature: @SneakyThrows(ReflectiveOperationException.class) @Override public XAConnection wrap(final XADataSource xaDataSource, final Connection connection)
focal_method.identifier: wrap
focal_method.invocations: unwrapPhysicalConnection getName getClass getDeclaredMethod getClass setAccessible invoke
focal_method.modifiers: @SneakyThrows(ReflectiveOperationException.class) @Override public
focal_method.parameters: (final XADataSource xaDataSource, final Connection connection)
focal_method.return: XAConnection
focal_method.signature: XAConnection wrap(final XADataSource xaDataSource, final Connection connection)