TabPanelWithDropdowns extends Composite { public void addTabBarWidget(final IsWidget customWidget) { this.getWidgetsPanel().add(customWidget); this.getWidgetsPanel().setCellHorizontalAlignment(customWidget, endOf(LTR)); }  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 testAddTabBarWidget() throws Exception { doReturn(tabBarWidgetsPanel).when(tabPanel).getWidgetsPanel(); final IsWidget widget = mock(IsWidget.class); tabPanel.addTabBarWidget(widget); verify(tabBarWidgetsPanel).add(eq(widget)); verify(tabBarWidgetsPanel).setCellHorizontalAlignment(eq(widget), eq(endOf(LTR))); }