function testRequestLock_SharedExclusive() {
  var dataItems = j;

  var exclusiveLockId = 0;
  assertTrue(lockManager.requestLock(
      exclusiveLockId, dataItems, lf.proc.LockType.RESERVED_READ_WRITE));
  assertTrue(lockManager.requestLock(
      exclusiveLockId, dataItems, lf.proc.LockType.EXCLUSIVE));

  for (var i = 1; i < 5; i++) {
    var taskId = i;
    assertTrue(lockManager.requestLock(
        taskId, dataItems, lf.proc.LockType.RESERVED_READ_ONLY));
    assertFalse(lockManager.requestLock(
        taskId, dataItems, lf.proc.LockType.SHARED));
  }

  lockManager.releaseLock(exclusiveLockId, dataItems);

  for (var i = 1; i < 5; i++) {
    var taskId = i;
    // RESERVED_READ_ONLY lock is already being held. Calling requestLock()
    // should still return true for such cases.
    assertTrue(lockManager.requestLock(
        taskId, dataItems, lf.proc.LockType.RESERVED_READ_ONLY));
    assertTrue(lockManager.requestLock(
        taskId, dataItems, lf.proc.LockType.SHARED));
  }

  // Ensuring that a RESERVED_READ_WRITE lock can be granted, but can't be
  // escalated yet to an EXCLUSIVE.
  assertTrue(lockManager.requestLock(
      exclusiveLockId, dataItems, lf.proc.LockType.RESERVED_READ_WRITE));
  assertFalse(lockManager.requestLock(
      exclusiveLockId, dataItems, lf.proc.LockType.EXCLUSIVE));
}
Checks that for a given resource,
1) a SHARED lock can't be granted if an EXCLUSIVE lock has already been
   granted.
2) an EXCLUSIVE can't be granted if SHARED locks have already been granted.