CommandResponseListener extends RequestListener implements Disposable { @Override public void dispose() { callbacks.dispose(); } CommandResponseListener(); @Override void dispose(); void addCallback( UUID commandId, CommandCallback callback, int timeout, final Semaphore semaphore ); @Override Object onRequest( final Payload payload );  }
@Test public void testDispose() throws Exception { commandResponseListener.dispose(); verify( callbacks ).dispose(); }