LynxPresenter implements Lynx.Listener { public void updateFilter(String filter) { if (isInitialized) { LynxConfig lynxConfig = lynx.getConfig(); lynxConfig.setFilter(filter); lynx.setConfig(lynxConfig); clearView(); restartLynx(); } } 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 shouldNotUpdateFilterIfPresenterIsNotInitialized() { presenter.updateFilter(ANY_FILTER); verify(lynx, never()).setConfig(any(LynxConfig.class)); verify(lynx, never()).restart(); }