LynxPresenter implements Lynx.Listener { public void pause() { if (isInitialized) { isInitialized = false; lynx.stopReading(); lynx.unregisterListener(this); } } LynxPresenter(Lynx lynx, View view, int maxNumberOfTracesToShow); void setLynxConfig(LynxConfig lynxConfig); void resume(); void pause(); @Override void onNewTraces(List<Trace> traces); void updateFilter(String filter); void updateFilterTraceLevel(TraceLevel level); void onShareButtonClicked(); void onScrollToPosition(int lastVisiblePositionInTheList); List<Trace> getCurrentTraces();  }
@Test public void shouldStopLynxJustItWasInitializedBefore() { presenter.pause(); verify(lynx, never()).stopReading(); verify(lynx, never()).unregisterListener(presenter); }