private void deleteTransaction(long minTxnId, long maxTxnId) throws SQLException {
    DataSourceProvider dsp = DataSourceProviderFactory.tryGetDataSourceProviderOrNull(conf);
    DataSource ds = dsp.create(conf);
    Connection dbConn = ds.getConnection();
    Statement stmt = dbConn.createStatement();
    stmt.executeUpdate("DELETE FROM TXNS WHERE TXN_ID >=" + minTxnId + " AND TXN_ID <=" + maxTxnId);
    dbConn.commit();
    stmt.close();
    dbConn.close();
  }
Test openTxn and getOpenTxnList calls on TxnStore.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/txn/TestOpenTxn.java