### Question:
LockManagerImpl { public void releaseReadLock( Object resource, Object tx ) throws LockNotFoundException, IllegalResourceException { getRWLockForReleasing( resource, tx, 1, 0, true ).releaseReadLock( 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 shouldNotBePossibleReleaseNotExistingLock() { LockResource node1 = new LockResource( ResourceTypes.NODE, 1L ); LockTransaction lockTransaction = new LockTransaction(); LockManagerImpl lockManager = createLockManager(); expectedException.expect( LockNotFoundException.class ); expectedException.expectMessage("Lock not found for: "); lockManager.releaseReadLock( node1, lockTransaction ); }