MultiPageEditorViewImpl extends ResizeTabPanel implements MultiPageEditorView { TabPanelEntry makeTabPanelEntry(final Page page) { final String title = page.getLabel(); final Widget contents = page.getView().asWidget(); return new TabPanelEntry(title, contents); }  @Override void init(); void enableSelectedPageEvent(final Event<MultiPageEditorSelectedPageEvent> selectedPageEvent); void addPage(final Page page); @Override void addPage(int index, final Page page); void selectPage(int index); int selectedPage(); @Override void disablePage(int index); @Override void enablePage(int index); @Override int getPageIndex(final String title);  }
@Test public void testMakeTabPanelEntry() { final String title = ""; final PageView pageView = mock(PageView.class); final Widget widget = mock(Widget.class); doReturn(title).when(page).getLabel(); doReturn(pageView).when(page).getView(); doReturn(widget).when(pageView).asWidget(); final TabPanelEntry tabPanelEntry = view.makeTabPanelEntry(page); assertEquals(title, tabPanelEntry.getTitle()); assertEquals(widget, tabPanelEntry.getContents()); }