public boolean allowsLock(UUID ownerId) {
        Preconditions.checkNotNull(ownerId);
        boolean notLocked = isLeaseExpired() || !isLocked();
        return notLocked || allowsUnlock(ownerId);
    }
@Test(expected = NullPointerException.class)
    public void testAllowsLock_nullTransactionId() {
        LockGuard stateLock = LockGuard.NOT_LOCKED;
        stateLock.allowsLock(null);
    }