### Question:
SDLogPresenter implements SDLogContract.Presenter, Feature.FeatureListener { @Override public void onUpdate(@NonNull Feature f, @NonNull Feature.Sample sample) { @FeatureSDLogging.LoggingStatus int status = FeatureSDLogging.getLoggingStatus(sample); switch (status) { case FeatureSDLogging.LOGGING_STARTED: isLogging=true; displayStopLoggingView(); break; case FeatureSDLogging.LOGGING_STOPPED: isLogging=false; displayStartLoggingView(); break; case FeatureSDLogging.LOGGING_IO_ERROR: isLogging=false; mView.displayIOErrorLoggingView(); break; case FeatureSDLogging.LOGGING_NO_SD: isLogging=false; mView.displayNoSDCardErrorLoggingView(); break; } mView.setLogInterval(FeatureSDLogging.getLogInterval(sample)); mView.setSelectedFeature(FeatureSDLogging.getLoggedFeature(mLogFeature.getParentNode(),sample)); } 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 ifTheSDIsNotPresentTheErrorIsShown(){ mPresenter.onUpdate(mFeature, SD_NOT_FOUND_SAMPLE); verify(mView).displayNoSDCardErrorLoggingView(); }
@Test public void ifTheIOErrorTheErrorIOErrorIsShown(){ mPresenter.onUpdate(mFeature,IO_ERROR_SAMPLE); verify(mView).displayIOErrorLoggingView(); }