Navigator extends ParentController { @Override public void setDefaultOptions(Options defaultOptions) { super.setDefaultOptions(defaultOptions); this.defaultOptions = defaultOptions; modalStack.setDefaultOptions(defaultOptions); } Navigator(final Activity activity, ChildControllersRegistry childRegistry, ModalStack modalStack, OverlayManager overlayManager, RootPresenter rootPresenter); @Override void setDefaultOptions(Options defaultOptions); Options getDefaultOptions(); FrameLayout getRootLayout(); void setEventEmitter(EventEmitter eventEmitter); void setContentLayout(ViewGroup contentLayout); void bindViews(); @NonNull @Override Collection<ViewController> getChildControllers(); @Override boolean handleBack(CommandListener listener); @Override void destroy(); void destroyViews(); @Override void sendOnNavigationButtonPressed(String buttonId); void setRoot(final ViewController viewController, CommandListener commandListener); void mergeOptions(final String componentId, Options options); void push(final String id, final ViewController viewController, CommandListener listener); void setStackRoot(String id, ViewController viewController, CommandListener listener); void pop(String id, Options mergeOptions, CommandListener listener); void popToRoot(final String id, Options mergeOptions, CommandListener listener); void popTo(final String id, Options mergeOptions, CommandListener listener); void showModal(final ViewController viewController, CommandListener listener); void dismissModal(final String componentId, CommandListener listener); void dismissAllModals(Options mergeOptions, CommandListener listener); void showOverlay(ViewController overlay, CommandListener listener); void dismissOverlay(final String componentId, CommandListener listener); @Nullable @Override ViewController findController(String id);  }
@Test public void setDefaultOptions() { uut.setDefaultOptions(new Options()); SimpleViewController spy = spy(child1); uut.setRoot(spy, new CommandListenerAdapter()); Options defaultOptions = new Options(); uut.setDefaultOptions(defaultOptions); verify(spy).setDefaultOptions(defaultOptions); verify(modalStack).setDefaultOptions(defaultOptions); }