public boolean allowsLock(UUID ownerId) {
        Preconditions.checkNotNull(ownerId);
        boolean notLocked = isLeaseExpired() || !isLocked();
        return notLocked || allowsUnlock(ownerId);
    }
@Test
    public void testAllowsLock_fail() throws Exception {
        Address endpoint = newAddress();
        LockGuard stateLock = new LockGuard(endpoint, TXN, 1000);
        assertFalse(stateLock.allowsLock(ANOTHER_TXN));
    }