### Question:
StackController extends ParentController<StackLayout> { @Override public boolean isRendered() { if (isEmpty()) return false; ViewGroup currentChild = getCurrentChild().getView(); if (currentChild instanceof Component) { return super.isRendered() && presenter.isRendered((Component) currentChild); } return super.isRendered(); } StackController(Activity activity, List<ViewController> children, ChildControllersRegistry childRegistry, TopBarController topBarController, NavigationAnimator animator, String id, Options initialOptions, BackButtonHelper backButtonHelper, StackPresenter stackPresenter, Presenter presenter); @Override boolean isRendered(); @Override void setDefaultOptions(Options defaultOptions); @Override void onAttachToParent(); @Override void mergeOptions(Options options); @Override void applyChildOptions(Options options, Component child); @Override void mergeChildOptions(Options options, ViewController childController, Component child); @Override void destroy(); @Override void clearOptions(); @Override void onChildDestroyed(Component child); void push(ViewController child, CommandListener listener); void setRoot(List<ViewController> children, CommandListener listener); void pop(Options mergeOptions, CommandListener listener); void popTo(ViewController viewController, Options mergeOptions, CommandListener listener); void popToRoot(Options mergeOptions, CommandListener listener); int size(); boolean isEmpty(); @Override boolean handleBack(CommandListener listener); @Override void sendOnNavigationButtonPressed(String buttonId); @NonNull @Override Collection<ViewController> getChildControllers(); @Override void setupTopTabsWithViewPager(ViewPager viewPager); @Override void clearTopTabs(); @RestrictTo(RestrictTo.Scope.TESTS) TopBar getTopBar(); @RestrictTo(RestrictTo.Scope.TESTS) StackLayout getStackLayout();  }### Answer:
@Test public void isRendered() { disablePushAnimation(child1); uut.push(child1, new CommandListenerAdapter()); verify(presenter).isRendered((Component) child1.getView()); verify(renderChecker).areRendered(any()); assertThat(uut.isRendered()).isTrue(); child1.setWaitForRender(new Bool(true)); assertThat(uut.isRendered()).isFalse(); child1.getView().addView(new View(activity)); assertThat(uut.isRendered()).isTrue(); Mockito.when(presenter.isRendered((Component) child1.getView())).then(ignored -> false); assertThat(uut.isRendered()).isFalse(); }