NamedLocks { public int size() { try { masterLock.lock(); return locks.size(); } finally { masterLock.unlock(); } }  Lock writeLock( String name ); Lock readLock( String name ); int size();  }
@Test public void shouldHaveNoLocksToStart() { assertThat(namedLocks.size(), is(0)); }