### Question:
SideMenuController extends ParentController<DrawerLayout> implements DrawerLayout.DrawerListener { public void setRightController(ViewController controller) { this.right = controller; int height = this.getHeight(options.sideMenuRootOptions.right); int width = this.getWidth(options.sideMenuRootOptions.right); getView().addView(controller.getView(), new LayoutParams(width, height, Gravity.RIGHT)); } SideMenuController(Activity activity, ChildControllersRegistry childRegistry, String id, Options initialOptions, SideMenuPresenter sideMenuOptionsPresenter, Presenter presenter); @Override void sendOnNavigationButtonPressed(String buttonId); @NonNull @Override Collection<ViewController> getChildControllers(); @Override void applyChildOptions(Options options, Component child); @Override void mergeChildOptions(Options options, ViewController childController, Component child); @Override void mergeOptions(Options options); @Override Options resolveCurrentOptions(); @Override void onDrawerOpened(@NonNull View drawerView); @Override void onDrawerClosed(@NonNull View drawerView); @Override boolean handleBack(CommandListener listener); void setCenterController(ViewController centerController); void setLeftController(ViewController controller); void setRightController(ViewController controller); @Override void onDrawerSlide(@NonNull View drawerView, float slideOffset); @Override void onDrawerStateChanged(int newState);  }### Answer:
@Test public void setRightController_matchesParentByDefault() { SideMenuOptions options = new SideMenuOptions(); assertThat(options.width.hasValue()).isFalse(); assertThat(options.height.hasValue()).isFalse(); uut.options.sideMenuRootOptions.left = options; SimpleComponentViewController componentViewController = new SimpleComponentViewController(activity, childRegistry, "right", new Options()); uut.setRightController(componentViewController); LayoutParams params = componentViewController.getView().getLayoutParams(); assertThat(params.width).isEqualTo(MATCH_PARENT); assertThat(params.height).isEqualTo(MATCH_PARENT); }
@Test public void rightMenuOpen_visibilityEventsAreEmitted() { ViewController spy = spy(right); uut.setRightController(spy); activity.setContentView(uut.getView()); assertThat(uut.getView().isDrawerOpen(Gravity.RIGHT)).isFalse(); verify(spy, times(0)).onViewAppeared(); openRightMenu(); assertThat(uut.getView().isDrawerOpen(Gravity.RIGHT)).isTrue(); verify(spy).onViewAppeared(); closeRightMenu(); assertThat(uut.getView().isDrawerOpen(Gravity.RIGHT)).isFalse(); verify(spy).onViewDisappear(); }