MessageRequestListener extends MessageListener implements Disposable { @Override public void dispose() { notifier.shutdown(); } MessageRequestListener( LocalPeer localPeer, Messenger messenger ); @Override void dispose(); @Override void onMessage( final Message message );  }
@Test public void testDispose() throws Exception { listener.dispose(); verify( notifier ).shutdown(); }