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