Bug 325836 EPartService's createSharedPart(*) methods should not need its MWindow parameter
The service should only be interacting with its own window and not some other random window.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
private void testShowPart_Bug307747(PartState partState) {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MPartDescriptor partDescriptor = org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicFactoryImpl.eINSTANCE
				.createPartDescriptor();
		partDescriptor.setElementId("partId");
		partDescriptor.setCategory("category");
		application.getDescriptors().add(partDescriptor);
		final MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		
		MPartStack stack = BasicFactoryImpl.eINSTANCE.createPartStack();
		stack.setElementId("category");
		window.getChildren().add(stack);
		window.setSelectedElement(stack);
		MPart partA = BasicFactoryImpl.eINSTANCE.createPart();
		stack.getChildren().add(partA);
		stack.setSelectedElement(partA);
		
		initialize(applicationContext, application);
		
		getEngine().createGui(window);
		EPartService partService = (EPartService) window.getContext().get(
				EPartService.class.getName());
		partService.activate(partA);
		MPart partB = partService.showPart("partId", partState);
		
		assertNotNull("The part should have been rendered", partB.getContext());
	}