WorkbenchMegaMenuStandalonePresenter extends WorkbenchMegaMenuPresenter { @Override public void addMenus(final Menus menus) { } @Inject  WorkbenchMegaMenuStandalonePresenter(final AuthorizationManager authzManager,
                                         final PerspectiveManager perspectiveManager,
                                         final ActivityManager activityManager,
                                         final User identity,
                                         final View view,
                                         final ManagedInstance<MegaMenuBrand> megaMenuBrands,
                                         final PlaceManager placeManager,
                                         final AuthorizationManager authorizationManager,
                                         final SessionInfo sessionInfo,
                                         final ManagedInstance<ChildMenuItemPresenter> childMenuItemPresenters,
                                         final ManagedInstance<GroupMenuItemPresenter> groupMenuItemPresenters,
                                         final ManagedInstance<ChildContextMenuItemPresenter> childContextMenuItemPresenters,
                                         final ManagedInstance<GroupContextMenuItemPresenter> groupContextMenuItemPresenters,
                                         final Workbench workbench,
                                         final ExperimentalActivitiesAuthorizationManager experimentalActivitiesAuthorizationManager); @Override void addMenus(final Menus menus);  }
@Test public void testAddMenus() { final String perspectiveId = "perspectiveId"; final String label = "perspectiveLabel"; final Menus menus = MenuFactory.newSimpleItem(label).perspective(perspectiveId).endMenu().build(); when(authzManager.authorize(menus.getItems().get(0), identity)).thenReturn(true); presenter.addMenus(menus); verify(authzManager, never()).authorize(any(MenuItem.class), any(User.class)); verify(presenter, never()).addMenuItem(anyString(), anyString(), anyString(), any(Command.class), any(MenuPosition.class)); }