### Question:
ParentController extends ChildController { @CallSuper protected void clearOptions() { performOnParentController(parent -> ((ParentController) parent).clearOptions()); options = initialOptions.copy().clearOneTimeOptions(); } ParentController(Activity activity, ChildControllersRegistry childRegistry, String id, Presenter presenter, Options initialOptions); @Override void setWaitForRender(Bool waitForRender); @Override void setDefaultOptions(Options defaultOptions); @Override @CheckResult Options resolveCurrentOptions(); @Override @CheckResult Options resolveCurrentOptions(Options defaultOptions); @NonNull @Override T getView(); @NonNull abstract Collection<? extends ViewController> getChildControllers(); @Nullable @Override ViewController findController(final String id); @Override boolean containsComponent(Component component); @CallSuper void applyChildOptions(Options options, Component child); @CallSuper void mergeChildOptions(Options options, ViewController childController, Component child); @Override void destroy(); void setupTopTabsWithViewPager(ViewPager viewPager); void clearTopTabs(); @Override boolean isRendered(); void onChildDestroyed(Component child);  }### Answer:
@Test public void optionsAreClearedWhenChildIsAppeared() { StackController stackController = spy(TestUtils.newStackController(activity).build()); stackController.ensureViewIsCreated(); SimpleViewController child1 = new SimpleViewController(activity, childRegistry, "child1", new Options()); stackController.push(child1, new CommandListenerAdapter()); child1.onViewAppeared(); verify(stackController, times(1)).clearOptions(); }