### Question:
SlaveLocksClient implements Locks.Client { @Override public void releaseExclusive( ResourceType resourceType, long... resourceIds ) { assertNotStopped(); client.releaseExclusive( resourceType, resourceIds ); } SlaveLocksClient( Master master, Locks.Client local, Locks localLockManager,
            RequestContextFactory requestContextFactory, AvailabilityGuard availabilityGuard, LogProvider logProvider ); @Override void acquireShared( LockTracer tracer, ResourceType resourceType, long... resourceIds ); @Override void acquireExclusive( LockTracer tracer, ResourceType resourceType, long... resourceIds ); @Override boolean tryExclusiveLock( ResourceType resourceType, long resourceId ); @Override boolean trySharedLock( ResourceType resourceType, long resourceId ); @Override boolean reEnterShared( ResourceType resourceType, long resourceId ); @Override boolean reEnterExclusive( ResourceType resourceType, long resourceId ); @Override void releaseShared( ResourceType resourceType, long... resourceIds ); @Override void releaseExclusive( ResourceType resourceType, long... resourceIds ); @Override void prepare(); @Override void stop(); @Override void close(); @Override int getLockSessionId(); @Override Stream<? extends ActiveLock> activeLocks(); @Override long activeLockCount();  }### Answer:
@Test public void releaseExclusiveFailsWhenClientStopped() { SlaveLocksClient client = stoppedClient(); try { client.releaseExclusive( NODE, 1 ); } catch ( Exception e ) { assertThat( e, instanceOf( LockClientStoppedException.class ) ); } }
@Test public void releaseExclusiveFailsWhenClientClosed() { SlaveLocksClient client = closedClient(); try { client.releaseExclusive( NODE, 1 ); } catch ( Exception e ) { assertThat( e, instanceOf( LockClientStoppedException.class ) ); } }