OntologyHierarchiesPresenterImpl implements OntologyHierarchiesView.Presenter,
                                                         OntologyHierarchySelectionChangedEvent.OntologyHierarchySelectionChangedEventHandler,
                                                         AppRatingSelected.AppRatingSelectedHandler,
                                                         AppRatingDeselected.AppRatingDeselectedHandler,
                                                         AppFavoriteSelectedEvent.AppFavoriteSelectedEventHandler,
                                                         DetailsHierarchyClicked.DetailsHierarchyClickedHandler,
                                                         DetailsCategoryClicked.DetailsCategoryClickedHandler { void createViewTabs(List<OntologyHierarchy> results) { for (OntologyHierarchy hierarchy : results) { TreeStore<OntologyHierarchy> treeStore = getHierarchyTreeStore(); OntologyHierarchiesView view = viewFactory.create(treeStore); Tree<OntologyHierarchy, String> tree = view.getTree(); tree.mask(appearance.getAppCategoriesLoadingMask()); getFilteredHierarchies(hierarchy, tree); String hierarchyDebugId = baseID + "." + hierarchy.getIri(); view.asWidget().ensureDebugId(hierarchyDebugId); view.addOntologyHierarchySelectionChangedEventHandler(this); viewTabPanel.insert(tree, viewTabPanel.getWidgetCount() - 1, new TabItemConfig(appearance.hierarchyLabelName(hierarchy)), hierarchyDebugId); } } @Inject  OntologyHierarchiesPresenterImpl(OntologyHierarchiesViewFactory viewFactory,
                                            OntologyServiceFacade serviceFacade,
                                            EventBus eventBus,
                                            OntologyHierarchiesView.OntologyHierarchiesAppearance appearance); @Override void go(final DETabPanel tabPanel); @Override void setViewDebugId(String baseID); @Override void onAppInfoSelected(final AppInfoSelectedEvent event); @Override void onAppSearchResultLoad(AppSearchResultLoadEvent event); @Override void onOntologyHierarchySelectionChanged(OntologyHierarchySelectionChangedEvent event); @Override void onAppRatingDeselected(AppRatingDeselected event); @Override void onAppRatingSelected(AppRatingSelected event); @Override void onAppFavoriteSelected(AppFavoriteSelectedEvent event); @Override void onDetailsHierarchyClicked(DetailsHierarchyClicked event); @Override void onDetailsCategoryClicked(DetailsCategoryClicked event); @Override HandlerRegistration addOntologyHierarchySelectionChangedEventHandler(
            OntologyHierarchySelectionChangedEvent.OntologyHierarchySelectionChangedEventHandler handler);  }
@Test public void testCreateViewTabs() throws Exception { when(hierarchyListMock.iterator()).thenReturn(hierarchyListIterator); OntologyHierarchiesPresenterImpl spy = spy(uut); spy.createViewTabs(hierarchyListMock); verify(viewMock).addOntologyHierarchySelectionChangedEventHandler(spy); verify(tabPanelMock).insert(eq(hierarchyTreeMock), anyInt(), isA(TabItemConfig.class), anyString()); }