PartStackPresenter implements Presenter, PartStackView.ActionDelegate, PartStack { @Override public void go(AcceptsOneWidget container) { container.setWidget(view); if (activePart != null) { view.setActiveTab(parts.indexOf(activePart)); } } @Inject  PartStackPresenter(EventBus eventBus,
                              PartStackEventHandler partStackEventHandler,
                              @Assisted final PartStackView view,
                              @Assisted WorkBenchPartController workBenchPartController); @Override void go(AcceptsOneWidget container); @Override void addPart(PartPresenter part); @Override void addPart(PartPresenter part, Constraints constraint); @Override boolean containsPart(PartPresenter part); @Override int getNumberOfParts(); @Override PartPresenter getActivePart(); @Override void setActivePart(PartPresenter part); List<PartPresenter> getPartPresenters(); @Override void hidePart(PartPresenter part); @Override void removePart(PartPresenter part); @Override void onRequestFocus(); @Override void setFocus(boolean focused);  }
@Test public void testGo() throws Exception { AcceptsOneWidget container = mock(AcceptsOneWidget.class); presenter.go(container); verify(container).setWidget(eq(view)); verify(view, never()).setActiveTab(anyInt()); }