OLATResourceable ores = OresHelper.createOLATResourceableInstanceWithoutCheck(LockTest.class.getName(), new Long(123456789));
// ------------------ test the clusterlockmanager ----------------------
// create a lock
String asset = OresHelper.createStringRepresenting(ores, "locktest");
LockImpl li = cm.createLockImpl(asset, ident);
cm.saveLock(li);
DBFactory.getInstance().closeSession();
// find it
LockImpl l2 = cm.findLock(asset);
assertNotNull(l2);
assertEquals(li.getKey(), l2.getKey());
// delete it
cm.deleteLock(l2);
DBFactory.getInstance().closeSession();
// may not find it again
LockImpl l3 = cm.findLock(asset);
assertNull(l3);
// ------------------ test the clusterlocker ----------------------
Locker cl = CoordinatorManager.getCoordinator().getLocker();