WorkbenchMenuBarStandalonePresenter extends WorkbenchMenuBarPresenter { @Override public void addMenus(final Menus menus) { } WorkbenchMenuBarStandalonePresenter(final AuthorizationManager authzManager,
                                        final PerspectiveManager perspectiveManager,
                                        final PlaceManager placeManager,
                                        final ActivityManager activityManager,
                                        final User identity,
                                        final View view,
                                        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(view, never()).addMenuItem(anyString(), anyString(), anyString(), any(Command.class), any(MenuPosition.class)); }