WorkbenchMenuCompactNavBarView extends WorkbenchMenuNavBarView { @Override public void clear() { super.clear(); menuLabelMap.clear(); menuItemContextMenus.clear(); this.navbarNav.add(listDropDown); }  @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); @Override void clear();  }
@Test public void testClear() { workbenchMenuCompactNavBarView.getMenuItemContextMenus().put("key", mock(ComplexPanel.class)); workbenchMenuCompactNavBarView.getMenuItemContextWidgetMap().put("key", mock(ComplexPanel.class)); workbenchMenuCompactNavBarView.clear(); verify(navbarNav).clear(); assertTrue(workbenchMenuCompactNavBarView.getMenuItemContextMenus().isEmpty()); assertTrue(workbenchMenuCompactNavBarView.getMenuItemContextWidgetMap().isEmpty()); }