assertFalse("the object is locked", ocm.isLocked("/test"));
assertNull("Attribute lockowner is not null", lockable.getLockOwner());
// --------------------------------------------------------------------------------
// Lock the object
// --------------------------------------------------------------------------------
Lock lock = ocm.lock("/test", true, false);
// --------------------------------------------------------------------------------
// Check if the object is locked
// --------------------------------------------------------------------------------
assertTrue("the object is not locked", ocm.isLocked("/test"));
// --------------------------------------------------------------------------------
// Unlock the object
// --------------------------------------------------------------------------------
ocm.unlock("/test", lock.getLockToken());
// --------------------------------------------------------------------------------
// Check if the object is locked
// --------------------------------------------------------------------------------
assertFalse("the object is locked", ocm.isLocked("/test"));
// --------------------------------------------------------------------------------
// Lock & update
// --------------------------------------------------------------------------------
lock = ocm.lock("/test", true, false);
assertTrue("the object is not locked", ocm.isLocked("/test"));
lockable = (Lockable) ocm.getObject("/test");
assertNotNull("Attribute lockowner is null", lockable.getLockOwner());
lockable.setA1("new a1 Value");
ocm.update(lockable);
ocm.save();
ocm.unlock("/test", lock.getLockToken());
// --------------------------------------------------------------------------------
// Remove the object
// --------------------------------------------------------------------------------