### Question:
SDLogPresenter implements SDLogContract.Presenter, Feature.FeatureListener { @Override public void startDemo() { if(mLogFeature==null) { mView.displayDisableLoggingView(); return; } mLogFeature.addFeatureListener(this); mView.displayFeatureList(); mView.displayLogInterval(); mView.setLogInterval(DEFAULT_LOG_INTERVAL); mLogFeature.enableNotification(); readFeature(mLogFeature); } SDLogPresenter(SDLogContract.View view, FeatureSDLogging logging); @Override void startDemo(); @Override void stopDemo(); @Override void onStartStopLogPressed(); @Override void onUpdate(@NonNull Feature f, @NonNull Feature.Sample sample);  }### Answer:
@Test public void ifTheFeatureIsNullTheViewIsDisabled() { SDLogContract.Presenter presenter = new SDLogPresenter(mView, null); presenter.startDemo(); verify(mView).displayDisableLoggingView(); }
@Test public void whenDemosStartIntervalIsSetTo1sec() { mPresenter.startDemo(); verify(mView).setLogInterval(1); }