@Test
  public void testMultiGapWithOldCommit() throws Exception {
    OpenTxnRequest openTxnRequest = new OpenTxnRequest(1, "me", "localhost");
    long first = txnHandler.openTxns(openTxnRequest).getTxn_ids().get(0);
    txnHandler.commitTxn(new CommitTxnRequest(first));
    long second = txnHandler.openTxns(new OpenTxnRequest(10, "me", "localhost")).getTxn_ids().get(0);
    deleteTransaction(second, second + 9);
    txnHandler.openTxns(openTxnRequest);
    GetOpenTxnsResponse openTxns = txnHandler.getOpenTxns();
    Assert.assertEquals(11, openTxns.getOpen_txnsSize());
  }
Test openTxn and getOpenTxnList calls on TxnStore.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/txn/TestOpenTxn.java