WorkbenchMenuStandardNavBarView extends WorkbenchMenuNavBarView { @Override public void addGroupMenuItem(final String id, final String label, final MenuPosition position) { final ListDropDown listDropDown = GWT.create(ListDropDown.class); final AnchorButton anchor = GWT.create(AnchorButton.class); anchor.setDataToggle(Toggle.DROPDOWN); anchor.setText(label); final DropDownMenu dropDownMenu = GWT.create(DropDownMenu.class); listDropDown.add(anchor); listDropDown.add(dropDownMenu); positionMenuItem(listDropDown, position); navbarNav.add(listDropDown); getMenuItemWidgetMap().put(id, dropDownMenu); }  @Override void addMenuItem(final String id,
                            final String label,
                            final String parentId,
                            final Command command,
                            final MenuPosition position); @Override void addCustomMenuItem(final Widget menu,
                                  final MenuPosition position); @Override void addGroupMenuItem(final String id,
                                 final String label,
                                 final MenuPosition position); @Override void addContextMenuItem(
            final String menuItemId,
            final String id,
            final String label,
            final String parentId,
            final Command command,
            final MenuPosition position); @Override void addContextGroupMenuItem(final String menuItemId,
                                        final String id,
                                        final String label,
                                        final MenuPosition position); @Override void clearContextMenu(); @Override void selectMenuItem(final String id);  }
@Test public void testAddGroupMenuItem() { final String menuId = RandomStringUtils.random(10); final String label = RandomStringUtils.random(10); final MenuPosition position = MenuPosition.RIGHT; workbenchMenuStandardNavBarView.addGroupMenuItem(menuId, label, position); verify(workbenchMenuStandardNavBarView).positionMenuItem(any(AbstractListItem.class), eq(position)); }