// can't rely on the negative test since other entries may share the same lock with lock striping.
assert !icc.createInvocationContext(true, -1).hasLockedKey(key) : key + " lock recorded!";
}
public static void assertNoLocks(LockManager lockManager, InvocationContextContainer icc) {
LockContainer lc = (LockContainer) TestingUtil.extractField(lockManager, "lockContainer");
assert lc.getNumLocksHeld() == 0 : "Stale locks exist! NumLocksHeld is " + lc.getNumLocksHeld() + " and lock info is " + lockManager.printLockInfo();
}