LynxPresenter implements Lynx.Listener { public void setLynxConfig(LynxConfig lynxConfig) { validateLynxConfig(lynxConfig); updateBufferConfig(lynxConfig); updateLynxConfig(lynxConfig); } 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(expected = IllegalArgumentException.class) public void shouldNotAcceptNullLynxConfigs() { presenter.setLynxConfig(null); }
@Test public void shouldUpdateLynxConfigOnSetLynxConfig() { LynxConfig lynxConfig = new LynxConfig(); presenter.setLynxConfig(lynxConfig); verify(lynx).setConfig(lynxConfig); }