### Question:
ComponentViewController extends ChildController<ComponentLayout> { @Override public boolean isViewShown() { return super.isViewShown() && view.isReady(); } ComponentViewController(final Activity activity,
                                   final ChildControllersRegistry childRegistry,
                                   final String id,
                                   final String componentName,
                                   final ReactViewCreator viewCreator,
                                   final Options initialOptions,
                                   final Presenter presenter,
                                   final ComponentPresenter componentPresenter); @Override void setDefaultOptions(Options defaultOptions); @Override void onViewAppeared(); @Override void onViewDisappear(); @Override void sendOnNavigationButtonPressed(String buttonId); @Override void applyOptions(Options options); @Override boolean isViewShown(); @Override void mergeOptions(Options options); @Override void destroy();  }### Answer:
@Test public void isViewShownOnlyIfComponentViewIsReady() { assertThat(uut.isViewShown()).isFalse(); uut.ensureViewIsCreated(); when(view.asView().isShown()).thenReturn(true); assertThat(uut.isViewShown()).isFalse(); when(view.isReady()).thenReturn(true); assertThat(uut.isViewShown()).isTrue(); }