}
// Acquire a valid lock
FileLock tmpLock = readOnlyChannel.tryLock(0, 10, true);
assertTrue(tmpLock.isValid());
tmpLock.release();
// Acquire another valid lock -- and don't release it yet
FileLock lock = readOnlyChannel.tryLock(10, 788, true);
assertTrue(lock.isValid());