public void acquireWriteLock(String key) {
        getLock(key).writeLock().lock();
    }
@Test
    public void shouldEnforceMutualExclusionOfWriteLockForGivenName() throws InterruptedException {
        readWriteLock.acquireWriteLock("foo");

        new Thread(() -> {
            readWriteLock.acquireWriteLock("foo");
            numberOfLocks++;
        }).start();

        Thread.sleep(1000);

        assertThat(numberOfLocks, is(0));
    }