TabPanelWithDropdowns extends Composite { public void insertItem(final TabPanelEntry tab, final int index) { registerTabHandlers(tab); insertTabAndContent(tab, index); resizeTabContent(); }  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 testInsertItem() { final int index = 1; doNothing().when(tabPanel).registerTabHandlers(any()); doNothing().when(tabPanel).insertTabAndContent(any(), anyInt()); doNothing().when(tabPanel).resizeTabContent(); tabPanel.insertItem(tabPanelEntry, index); verify(tabPanel).registerTabHandlers(tabPanelEntry); verify(tabPanel).insertTabAndContent(tabPanelEntry, index); verify(tabPanel).resizeTabContent(); }