### Question:
OverlayPresenter extends SimpleActivityLifecycleCallbacks implements ScreenTracker.ScreenListener { @Override public void onActivityStopped(Activity activity) { if (!isExpanded) { view.removeButton(activity); } } OverlayPresenter(
            OverlayView view,
            List<Page> allPages,
            SelectedPageStorage selectedPageStorage,
            ScreenTracker screenTracker,
            PhialNotifier notifier); @Override void onActivityStarted(Activity activity); @Override void onActivityStopped(Activity activity); @Override void onActivityResumed(Activity activity); @Override void onActivityPaused(Activity activity); @Override void onScreenChanged(Screen screen); @Nullable View findViewById(int id); void destroy();  }### Answer:
@Test public void onActivityStopped_removes_button() { presenter.onActivityStopped(activity); verify(view).removeButton(eq(activity)); }