### Question:
LockManagerImpl { public boolean tryReadLock( LockResource resource, Object tx ) throws IllegalResourceException { return unusedResourceGuard( resource, tx, getRWLockForAcquiring( resource, tx ).tryAcquireReadLock( tx ) ); } LockManagerImpl( RagManager ragManager, Config config, Clock clock ); boolean getReadLock( LockTracer tracer, LockResource resource, Object tx ); boolean tryReadLock( LockResource resource, Object tx ); boolean getWriteLock( LockTracer tracer, LockResource resource, Object tx ); boolean tryWriteLock( LockResource resource, Object tx ); void releaseReadLock( Object resource, Object tx ); void releaseWriteLock( Object resource, Object tx ); void accept( Visitor<RWLock,RuntimeException> visitor );  }### Answer:
@Test public void shouldReleaseNotAcquiredLocks() { LockResource node = new LockResource( ResourceTypes.NODE, 1L ); LockTransaction lockTransaction = new LockTransaction(); RWLock rwLock = Mockito.mock( RWLock.class ); LockManagerImpl lockManager = new MockedLockLockManager( new RagManager(), rwLock ); lockManager.tryReadLock( node, lockTransaction ); assertEquals( 0, countLocks( lockManager ) ); }