test_class.declarator: xaDataSource
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      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/XAConnectionFactoryTest.java
test_class.identifier: XAConnectionFactoryTest
test_case.body: @Test
      public void assertCreatePostgreSQLXAConnection() {
          assertThat(XAConnectionFactory.createXAConnection(DatabaseTypes.getActualDatabaseType("PostgreSQL"), xaDataSource, connection), instanceOf(PGXAConnection.class));
      }
test_case.class_method_signature: XAConnectionFactoryTest.assertCreatePostgreSQLXAConnection()
test_case.full_signature: @Test public void assertCreatePostgreSQLXAConnection()
test_case.identifier: assertCreatePostgreSQLXAConnection
test_case.invocations: assertThat createXAConnection getActualDatabaseType instanceOf
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertCreatePostgreSQLXAConnection()
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/XAConnectionFactory.java
focal_class.identifier: XAConnectionFactory
focal_class.class_method_signature: XAConnectionFactory.createXAConnection(final DatabaseType databaseType, final XADataSource xaDataSource, final Connection connection)
focal_class.full_signature: public static XAConnection createXAConnection(final DatabaseType databaseType, final XADataSource xaDataSource, final Connection connection)
focal_class.identifier: createXAConnection
focal_class.modifiers: public static
focal_class.parameters: (final DatabaseType databaseType, final XADataSource xaDataSource, final Connection connection)
focal_class.return: XAConnection
focal_class.signature: XAConnection createXAConnection(final DatabaseType databaseType, final XADataSource xaDataSource, final Connection connection)
focal_method.body: public static XAConnection createXAConnection(final DatabaseType databaseType, final XADataSource xaDataSource, final Connection connection) {
          switch (databaseType.getName()) {
              case "MySQL":
                  return new MySQLXAConnectionWrapper().wrap(xaDataSource, connection);
              case "MariaDB":
                  return new MariaDBXAConnectionWrapper().wrap(xaDataSource, connection);
              case "PostgreSQL":
                  return new PostgreSQLXAConnectionWrapper().wrap(xaDataSource, connection);
              case "H2":
                  return new H2XAConnectionWrapper().wrap(xaDataSource, connection);
              case "Oracle":
                  return new OracleXAConnectionWrapper().wrap(xaDataSource, connection);
              default:
                  throw new UnsupportedOperationException(String.format("Cannot support database type: `%s`", databaseType));
          }
      }
focal_method.class_method_signature: XAConnectionFactory.createXAConnection(final DatabaseType databaseType, final XADataSource xaDataSource, final Connection connection)
focal_method.full_signature: public static XAConnection createXAConnection(final DatabaseType databaseType, final XADataSource xaDataSource, final Connection connection)
focal_method.identifier: createXAConnection
focal_method.invocations: getName wrap wrap wrap wrap wrap format
focal_method.modifiers: public static
focal_method.parameters: (final DatabaseType databaseType, final XADataSource xaDataSource, final Connection connection)
focal_method.return: XAConnection
focal_method.signature: XAConnection createXAConnection(final DatabaseType databaseType, final XADataSource xaDataSource, final Connection connection)