TabPanelWithDropdowns extends Composite { public TabPanelEntry addItem(String label, Widget content) { TabPanelEntry tab = new TabPanelEntry(label, content); addItem(tab); return tab; }  HandlerRegistration addShowHandler(TabShowHandler tabShowHandler); HandlerRegistration addShownHandler(TabShownHandler tabShownHandler); @PostConstruct void init(); TabPanelEntry addItem(String label,
                                 Widget content); void addItem(final TabPanelEntry tab); void insertItem(final TabPanelEntry tab,
                           final int index); NavTabs getTabBar(); boolean remove(TabPanelEntry tab); DropDownTab addDropdownTab(String label); void addDropdownTab(DropDownTab contents); void clear(); TabPanelEntry getActiveTab(); int getSelectedTabIndex(); void selectTabIndex(int index); TabPanelEntry findEntryForTabWidget(final TabListItem tabWidget); void addTabBarWidget(final IsWidget customWidget);  }
@Test public void testAddItem() { final int index = 1; doNothing().when(tabPanel).insertItem(any(), anyInt()); doReturn(tabPanelEntries).when(tabPanel).getAllContentTabs(); tabPanel.addItem(tab); verify(tabPanel).insertItem(tab, index); }