function testRequestLock_SharedReserved() {
  var dataItems = j;

  // Granting SHARED locks to a bunch of tasks.
  for (var i = 0; i < 10; i++) {
    var taskId = i;
    assertTrue(lockManager.requestLock(taskId, j,
        lf.proc.LockType.RESERVED_READ_ONLY));
    assertTrue(lockManager.requestLock(taskId, j, lf.proc.LockType.SHARED));
  }

  // Granting a reserved lock to a single task.
  var reservedLockId = i + 1;
  assertTrue(lockManager.requestLock(
      reservedLockId, dataItems, lf.proc.LockType.RESERVED_READ_WRITE));

  // Expecting that no new SHARED locks can be granted.
  for (var i = 20; i < 30; i++) {
    var taskId = i;
    assertFalse(lockManager.requestLock(taskId, j,
        lf.proc.LockType.RESERVED_READ_ONLY));
    assertFalse(lockManager.requestLock(taskId, j, lf.proc.LockType.SHARED));
  }

  // Releasing RESERVED_READ_WRITE lock.
  lockManager.releaseLock(reservedLockId, dataItems);

  // Expecting new SHARED locks to be successfully granted.
  for (var i = 20; i < 30; i++) {
    var taskId = i;
    assertTrue(lockManager.requestLock(taskId, j,
        lf.proc.LockType.RESERVED_READ_ONLY));
    assertTrue(lockManager.requestLock(taskId, j, lf.proc.LockType.SHARED));
  }
}
Checks that for a given resource,
1) RESERVED_READ_ONLY, SHARED locks can't be granted if a RESERVED_READ_WRITE
  lock has already been granted.
2) RESERVED_READ_ONLY, SHARED locks can be granted after a previously granted
   RESERVED_READ_WRITE lock is released.