MultiPageEditorViewImpl extends ResizeTabPanel implements MultiPageEditorView { public void addPage(final Page page) { final TabPanelEntry tab = makeTabPanelEntry(page); addItem(tab); setAsActive(tab); }  @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 testAddPage() { doReturn(tab).when(view).makeTabPanelEntry(page); doNothing().when(view).addItem(any()); doNothing().when(view).setAsActive(any()); view.addPage(page); verify(view).addItem(tab); verify(view).setAsActive(tab); }