WizardViewImpl extends BaseModal implements
        WizardView { @Override public void hide() { super.hide(); releaseWizardPageTitles(); } WizardViewImpl(); @Override void init(final AbstractWizard presenter); @Override void setPageTitles(final List<WizardPage> pages); @Override void selectPage(final int pageNumber); @Override void setBodyWidget(final Widget w); @Override void setPreferredHeight(final int height); @Override void setPreferredWidth(final int width); @Override void setPageCompletionState(final int pageIndex,
                                       final boolean isComplete); @Override void setCompletionStatus(final boolean isComplete); @Override void show(); @Override void hide();  }
@Test public void testHide() { final WizardPage firstWizardPageMock = mock(WizardPage.class); final WizardPage secondWizardPageMock = mock(WizardPage.class); final WizardPageTitle firstTitleMock = mock(WizardPageTitle.class); final WizardPageTitle secondTitleMock = mock(WizardPageTitle.class); doReturn(firstTitleMock).when(view).makeWizardPageTitle(firstWizardPageMock); doReturn(secondTitleMock).when(view).makeWizardPageTitle(secondWizardPageMock); view.setPageTitles(Arrays.asList(firstWizardPageMock, secondWizardPageMock)); assertEquals(2, pageTitleWidgets.size()); view.hide(); verify(iocBeanManager).destroyBean(firstTitleMock); verify(iocBeanManager).destroyBean(secondTitleMock); assertEquals(0, pageTitleWidgets.size()); }