TaskDetailsMultiViewImpl extends Composite implements TaskDetailsMultiPresenter.TaskDetailsMultiView { protected void initTabs() { tabContent.setPaddingBottom(50); { genericFormDisplayPane = GWT.create(TabPane.class); genericFormDisplayPane.add(presenter.getTaskWorkView()); genericFormDisplayTab = GWT.create(TabListItem.class); genericFormDisplayTab.setText(constants.Work()); genericFormDisplayTab.setDataTargetWidget(genericFormDisplayPane); genericFormDisplayTab.addStyleName("uf-dropdown-tab-list-item"); navTabs.add(genericFormDisplayTab); tabContent.add(genericFormDisplayPane); genericFormDisplayTab.addShowHandler((final TabShowEvent event) -> presenter.taskCommentsRefresh()); } { taskDetailsPane = GWT.create(TabPane.class); taskDetailsPane.add(presenter.getTaskDetailsView()); taskDetailsTab = GWT.create(TabListItem.class); taskDetailsTab.setText(constants.Details()); taskDetailsTab.setDataTargetWidget(taskDetailsPane); taskDetailsTab.addStyleName("uf-dropdown-tab-list-item"); navTabs.add(taskDetailsTab); tabContent.add(taskDetailsPane); } { taskAssignmentsPane = GWT.create(TabPane.class); taskAssignmentsPane.add(presenter.getTaskAssignmentsView()); taskAssignmentsTab = GWT.create(TabListItem.class); taskAssignmentsTab.setText(constants.Assignments()); taskAssignmentsTab.setDataTargetWidget(taskAssignmentsPane); taskAssignmentsTab.addStyleName("uf-dropdown-tab-list-item"); navTabs.add(taskAssignmentsTab); tabContent.add(taskAssignmentsPane); taskAssignmentsTab.addShowHandler(new TabShowHandler() { @Override public void onShow(final TabShowEvent event) { presenter.taskAssignmentsRefresh(); } }); } { taskCommentsPane = GWT.create(TabPane.class); taskCommentsPane.add(presenter.getTaskCommentsView()); taskCommentsTab = GWT.create(TabListItem.class); taskCommentsTab.setText(constants.Comments()); taskCommentsTab.setDataTargetWidget(taskCommentsPane); taskCommentsTab.addStyleName("uf-dropdown-tab-list-item"); navTabs.add(taskCommentsTab); tabContent.add(taskCommentsPane); taskCommentsTab.addShowHandler(new TabShowHandler() { @Override public void onShow(final TabShowEvent event) { presenter.taskCommentsRefresh(); } }); } { taskAdminPane = GWT.create(TabPane.class); taskAdminPane.add(presenter.getTaskAdminView()); taskAdminTab = GWT.create(TabListItem.class); taskAdminTab.setText(constants.Task_Admin()); taskAdminTab.setDataTargetWidget(taskAdminPane); taskAdminTab.addStyleName("uf-dropdown-tab-list-item"); navTabs.add(taskAdminTab); tabContent.add(taskAdminPane); taskAdminTab.addShowHandler(new TabShowHandler() { @Override public void onShow(final TabShowEvent event) { presenter.taskAdminRefresh(); } }); } { taskLogsPane = GWT.create(TabPane.class); taskLogsPane.add(presenter.getTaskLogsView()); taskLogsTab = GWT.create(TabListItem.class); taskLogsTab.setText(constants.Logs()); taskLogsTab.setDataTargetWidget(taskLogsPane); taskLogsTab.addStyleName("uf-dropdown-tab-list-item"); navTabs.add(taskLogsTab); tabContent.add(taskLogsPane); taskLogsTab.addShowHandler(new TabShowHandler() { @Override public void onShow(final TabShowEvent event) { presenter.taskLogsRefresh(); } }); } }  @Override void init(final TaskDetailsMultiPresenter presenter); @Override void setAdminTabVisible(final boolean value); @Override void resetTabs(boolean onlyLogTab); @Override void displayAllTabs(); @Override void displayOnlyLogTab(); @Override void displayNotification(String text);  }
@Test public void initTabsTest() { taskDetailsMultiView.initTabs(); verify(presenter).getTaskWorkView(); verify(presenter).getTaskDetailsView(); verify(presenter).getTaskAssignmentsView(); verify(presenter).getTaskCommentsView(); verify(presenter).getTaskAdminView(); verify(presenter).getTaskLogsView(); verify(navTabs, times(6)).add(any(TabListItem.class)); verify(tabContent, times(6)).add(any(TabPane.class)); }