DefaultBeanFactory implements BeanFactory { @Override public WorkbenchPartPresenter newWorkbenchPart(final Menus menus, final String title, final IsWidget titleDecoration, final PartDefinition definition, final Class<? extends WorkbenchPartPresenter> partType) { final WorkbenchPartPresenter part = iocManager.lookupBean(partType).getInstance(); part.setTitle(title); part.setMenus(menus); part.setTitleDecoration(titleDecoration); part.setDefinition(definition); return part; }  @Override WorkbenchPartPresenter newWorkbenchPart(final Menus menus,
                                                   final String title,
                                                   final IsWidget titleDecoration,
                                                   final PartDefinition definition,
                                                   final Class<? extends WorkbenchPartPresenter> partType); @Override WorkbenchPanelPresenter newRootPanel(PerspectiveActivity activity,
                                                PanelDefinition root); @Override WorkbenchPanelPresenter newWorkbenchPanel(final PanelDefinition definition); @Override CompassDropController newDropController(final WorkbenchPanelView<?> view); @Override void destroy(final Object o);  }
@Test public void testNewTemplateWorkbenchPartPresenter() { beanFactory.newWorkbenchPart(null, null, null, null, UnanchoredWorkbenchPartPresenter.class); verify(iocManager.lookupBean(UnanchoredWorkbenchPartPresenter.class)).getInstance(); verify(iocManager.lookupBean(WorkbenchPartPresenterDefault.class), never()).getInstance(); }
@Test public void testNewWorkbenchPartPresenterDefault() { beanFactory.newWorkbenchPart(null, null, null, null, WorkbenchPartPresenterDefault.class); verify(iocManager.lookupBean(WorkbenchPartPresenterDefault.class)).getInstance(); verify(iocManager.lookupBean(UnanchoredWorkbenchPartPresenter.class), never()).getInstance(); }