lock.unlock();
}
@Test
public void testGetHoldCount() {
RLock lock = redisson.getLock("lock");
Assert.assertEquals(0, lock.getHoldCount());
lock.lock();
Assert.assertEquals(1, lock.getHoldCount());
lock.unlock();
Assert.assertEquals(0, lock.getHoldCount());
lock.lock();
lock.lock();
Assert.assertEquals(2, lock.getHoldCount());
lock.unlock();
Assert.assertEquals(1, lock.getHoldCount());
lock.unlock();
Assert.assertEquals(0, lock.getHoldCount());
}