function testRequestLock_ReservedExclusive() {
  var dataItems = j;
  var taskId = 0;
  assertTrue(lockManager.requestLock(
      taskId, dataItems, lf.proc.LockType.RESERVED_READ_WRITE));
  assertTrue(lockManager.requestLock(
      taskId, dataItems, lf.proc.LockType.EXCLUSIVE));

  for (var i = 1; i < 5; i++) {
    taskId = i;
    // Acquiring RESERVED_READ_WRITE lock once.
    assertTrue(lockManager.requestLock(
        taskId, dataItems, lf.proc.LockType.RESERVED_READ_WRITE));
    // Ensuring that RESERVED_READ_WRITE lock is re-entrant.
    assertTrue(lockManager.requestLock(
        taskId, dataItems, lf.proc.LockType.RESERVED_READ_WRITE));

    // Expecting EXCLUSIVE lock to be denied since it is held by the previous
    // taskId.
    assertFalse(lockManager.requestLock(
        taskId, dataItems, lf.proc.LockType.EXCLUSIVE));
    lockManager.releaseLock(taskId - 1, dataItems);

    // Expecting EXCLUSIVE lock to be granted since it was released by the
    // previous taskId.
    assertTrue(lockManager.requestLock(
        taskId, dataItems, lf.proc.LockType.EXCLUSIVE));
  }
}
Checks that for a given resource,
1) a RESERVED_READ_WRITE lock can be granted even if an EXCLUSIVE lock has
   already been granted.
2) an EXCLUSIVE lock can be granted, after a previous task releases it.