ProcessInstanceDetailsViewImpl extends Composite implements ProcessInstanceDetailsPresenter.ProcessInstanceDetailsView { public void initTabs() { tabContent.setPaddingBottom(50); { instanceDetailsPane = GWT.create(TabPane.class); instanceDetailsPane.add(presenter.getProcessInstanceView()); instanceDetailsTab = GWT.create(TabListItem.class); instanceDetailsTab.setText(constants.Process_Instance_Details()); instanceDetailsTab.setDataTargetWidget(instanceDetailsPane); instanceDetailsTab.addStyleName("uf-dropdown-tab-list-item"); tabContent.add(instanceDetailsPane); navTabs.add(instanceDetailsTab); } { processVariablesPane = GWT.create(TabPane.class); processVariablesPane.add(presenter.getProcessVariablesView()); processVariablesTab = GWT.create(TabListItem.class); processVariablesTab.setText(constants.Process_Variables()); processVariablesTab.setDataTargetWidget(processVariablesPane); processVariablesTab.addStyleName("uf-dropdown-tab-list-item"); tabContent.add(processVariablesPane); navTabs.add(processVariablesTab); processVariablesTab.addShowHandler(new TabShowHandler() { @Override public void onShow(final TabShowEvent event) { presenter.variableListRefreshGrid(); } }); } { documentPane = GWT.create(TabPane.class); documentPane.add(presenter.getDocumentView()); documentTab = GWT.create(TabListItem.class); documentTab.setText(constants.Documents()); documentTab.setDataTargetWidget(documentPane); documentTab.addStyleName("uf-dropdown-tab-list-item"); tabContent.add(documentPane); navTabs.add(documentTab); documentTab.addShowHandler(new TabShowHandler() { @Override public void onShow(final TabShowEvent event) { presenter.documentListRefreshGrid(); } }); } { logsPane = GWT.create(TabPane.class); logsPane.add(presenter.getLogsView()); logsTab = GWT.create(TabListItem.class); logsTab.setText(constants.Logs()); logsTab.setDataTargetWidget(logsPane); logsTab.addStyleName("uf-dropdown-tab-list-item"); tabContent.add(logsPane); navTabs.add(logsTab); } { diagramPane = GWT.create(TabPane.class); diagramPane.add(presenter.getProcessDiagramView()); diagramTab = GWT.create(TabListItem.class); diagramTab.addShownHandler(e -> presenter.onProcessDiagramTabShow()); diagramTab.setText(constants.Diagram()); diagramTab.setDataTargetWidget(diagramPane); diagramTab.addStyleName("uf-dropdown-tab-list-item"); tabContent.add(diagramPane); navTabs.add(diagramTab); } }  @Override void init(final ProcessInstanceDetailsPresenter presenter); void initTabs(); @Override void resetTabs(boolean onlyLogTab); @Override void displayAllTabs(); @Override void displayOnlyLogTab(); @Override void showDiagramTab(); @Override void displayNotification(String text);  }
@Test public void initTabsTest() { processInstanceDetailsMultiView.initTabs(); verify(presenter).getProcessInstanceView(); verify(presenter).getProcessVariablesView(); verify(presenter).getDocumentView(); verify(presenter).getLogsView(); verify(presenter).getProcessDiagramView(); verify(navTabs, times(5)).add(any(TabListItem.class)); verify(tabContent, times(5)).add(any(TabPane.class)); }