@Test
  public void testGapWithOldOpen() throws Exception {
    OpenTxnRequest openTxnRequest = new OpenTxnRequest(1, "me", "localhost");
    txnHandler.openTxns(openTxnRequest);
    Thread.sleep(1000);
    long second = txnHandler.openTxns(openTxnRequest).getTxn_ids().get(0);
    deleteTransaction(second);
    txnHandler.openTxns(openTxnRequest);
    GetOpenTxnsResponse openTxns = txnHandler.getOpenTxns();
    Assert.assertEquals(3, 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