lockOwner = (DldGlobalTransaction) TransactionFactory.TxFactoryEnum.DLD_NORECOVERY_XA.newGlobalTransaction();
}
public void testNoTransaction() throws Exception {
InvocationContext nonTx = new NonTxInvocationContext(AnyEquivalence.getInstance());
Lock mockLock = mock(Lock.class);
when(lc.acquireLock(nonTx.getLockOwner(), "k", config.locking().lockAcquisitionTimeout(), TimeUnit.MILLISECONDS)).thenReturn(mockLock).thenReturn(null);
assert lockManager.lockAndRecord("k", nonTx, config.locking().lockAcquisitionTimeout());
assert !lockManager.lockAndRecord("k", nonTx, config.locking().lockAcquisitionTimeout());
}