@SuppressWarnings( "LockAcquiredButNotSafelyReleased" )
    public AutoCloseableLock lock() throws IllegalStateException {
        checkNotReleased();
        lock.lock();
        return autoCloseable;
    }
@Test(timeout = 1000)
    public void locksWillBeAutoClosed() {

        final AtomicInteger callCount = new AtomicInteger(0);

        try (final AutoCloseableReentrantLock.AutoCloseableLock ignored = new AutoCloseableReentrantLock(AutoCloseableReentrantLockTest.class, "user1").lock()) {
            callCount.incrementAndGet();
        }

        try (final AutoCloseableReentrantLock.AutoCloseableLock ignored = new AutoCloseableReentrantLock(AutoCloseableReentrantLockTest.class, "user1").lock()) {
            callCount.incrementAndGet();
        }

        assertThat(callCount.get(), is(2));
    }