Bug 334559 EPartService's part searching path may not include parts outside of the active perspective
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
EPartService partService = window.getContext().get(EPartService.class);
		partService.activate(partA);
		partService.hidePart(partA);
		assertEquals(partC, partService.getActivePart());
	}
	/**
	 * Create two separate perspectives. The first one has a shared part partA
	 * in it. The second one has an unrendered part stack with the shared part
	 * partA in it, and then two other shared parts partB and partC are outside
	 * the part stack and are contained directly under the second perspective.
	 * <p>
	 * partA is initially active and we then switch perspectives to the second
	 * perspective. partB becomes active now. Then partB is hidden and then we
	 * want to assert that partC is the active part and that partA is not
	 * despite the fact that partA is contained in the activation history.
	 * </p>
	 */
	public void testHidePart_ActivationHistory22() {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MPart partA = BasicFactoryImpl.eINSTANCE.createPart();
		window.getSharedElements().add(partA);
		MPart partB = BasicFactoryImpl.eINSTANCE.createPart();
		window.getSharedElements().add(partB);
		MPart partC = BasicFactoryImpl.eINSTANCE.createPart();
		window.getSharedElements().add(partC);
		MPerspectiveStack perspectiveStack = AdvancedFactoryImpl.eINSTANCE