// Now try to create a WRITE lock on the same entity for a different owner.
IEntityLock duplicateLock = null;
msg = "Attempting to create a duplicate lock; should be null";
print(msg);
try { duplicateLock = service.newLock(GROUP_CLASS, testKeys[3], IEntityLockService.WRITE_LOCK, testIds[1]); }
catch (LockingException le) {print("Caught exception: " + le.getMessage()); }
assertNull(msg, duplicateLock);
}