AbstractMultiPartWorkbenchPanelPresenter extends AbstractDockingWorkbenchPanelPresenter<P> { public ContextActivity resolveContext(final PartDefinition part) { ContextActivity result = perspectiveContext; if (panelContext != null) { result = panelContext; } if (contextActivities.containsKey(part)) { result = contextActivities.get(part); } return result; } protected  AbstractMultiPartWorkbenchPanelPresenter(final WorkbenchPanelView<P> view,
                                                       final ActivityManager activityManager,
                                                       final PerspectiveManager perspectiveManager); @Override void setDefinition(final PanelDefinition definition); @Override void addPart(final WorkbenchPartPresenter part,
                        final String contextId); @Override boolean removePart(final PartDefinition part); ContextActivity resolveContext(final PartDefinition part);  }
@Test public void unknownPartsShouldResolveToPerspectiveContext() throws Exception { AbstractMultiPartWorkbenchPanelPresenter<?> presenter = getPresenterToTest(); final ContextActivity resolvedPerspectiveContextActivity = presenter.resolveContext(new PartDefinitionImpl(new DefaultPlaceRequest("randomUnknownPlace"))); assertSame(perspectiveContextActivity, resolvedPerspectiveContextActivity); }