@Test
public void ensure_that_consecutive_calls_on_same_string_return_the_same_lock() {

    // given
    ReentrantReadWriteLockGroup locks = new ReentrantReadWriteLockGroup(true, 3);
    // when
    ReentrantReadWriteLock lock1 = locks.getLock("1");
    ReentrantReadWriteLock lock2 = locks.getLock("1");
    ReentrantReadWriteLock lock3 = locks.getLock("1");
    // then
    assertEquals(lock1, lock2);
    assertEquals(lock1, lock3);
}