private List<ShowLocksResponseElement> getLocks(HiveTxnManager txnMgr) throws Exception {
    ShowLocksResponse rsp = ((DbLockManager)txnMgr.getLockManager()).getLocks();
    return rsp.getLocks();
  }
SessionState is stored in ThreadLoacal; UnitTest runs in a single thread (otherwise Derby wedges)
{@link HiveTxnManager} instances are per SessionState.
So to be able to simulate concurrent locks/transactions s/o forking threads we just swap
the TxnManager instance in the session (hacky but nothing is actually threading so it allows us
to write good tests)
ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java