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
MPerspective perspectiveB1 = AdvancedFactoryImpl.eINSTANCE
				.createPerspective();
		perspectiveStackB.getChildren().add(perspectiveB1);
		perspectiveStackB.setSelectedElement(perspectiveB1);
		MPerspective perspectiveB2 = AdvancedFactoryImpl.eINSTANCE
				.createPerspective();
		perspectiveStackB.getChildren().add(perspectiveB2);
		initialize(applicationContext, application);
		getEngine().createGui(windowA);
		getEngine().createGui(windowB);
		EPartService windowPartServiceA = windowA.getContext().get(
				EPartService.class);
		EPartService windowPartServiceB = windowB.getContext().get(
				EPartService.class);
		assertEquals(windowA.getContext(), application.getContext()
				.getActiveChild());
		assertEquals(perspectiveA1.getContext(), windowA.getContext()
				.getActiveChild());
		assertEquals(perspectiveB1.getContext(), windowB.getContext()
				.getActiveChild());
		windowPartServiceB.switchPerspective(perspectiveA2);
		assertEquals(windowA.getContext(), application.getContext()
				.getActiveChild());
		assertEquals(perspectiveA1.getContext(), windowA.getContext()
				.getActiveChild());
		assertEquals(perspectiveB1.getContext(), windowB.getContext()
				.getActiveChild());
		windowPartServiceA.switchPerspective(perspectiveA2);
		assertEquals(windowA.getContext(), application.getContext()
				.getActiveChild());