public void lock() {
        semaphore.acquireUninterruptibly();

        if (log.isDebugEnabled()) {
            owner = Thread.currentThread().getName();
            position = Thread.currentThread().getStackTrace()[2].toString();
            log.debug("<<< Lock {} acquired at {}", this.hashCode(), position);
        }
    }
@Test
    public void lock() {

        final CallbackMutex cbm = new CallbackMutex();
        final Account salary = new Account();
        salary.add(1000);
        // No thread competition here
        // We will test thread competition in unlock()
        new Thread(() -> {
            cbm.lock();
            if (salary.value() == 1000)
                salary.add(2000);
            cbm.unlock();
            Assert.assertEquals(salary.value(), 3000);
        }).start();
    }