Bug 343003 Selection changes for shared parts may not be propagated if they were not originally rendered in the model
The search algorithm currently only iterates through containers for parts. This will not work for parts that are represented by placeholders.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/ESelectionServiceTest.java
MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MPart partA = BasicFactoryImpl.eINSTANCE.createPart();
		partA.setElementId("partA"); 
		window.getChildren().add(partA);
		window.setSelectedElement(partA);
		MPart partB = BasicFactoryImpl.eINSTANCE.createPart();
		partB.setElementId("partB"); 
		window.getChildren().add(partB);
		initialize(applicationContext, application);
		getEngine().createGui(window);
		IEclipseContext contextB = partB.getContext();
		IEclipseContext windowContext = window.getContext();
		ESelectionService serviceB = (ESelectionService) contextB
				.get(ESelectionService.class.getName());
		ESelectionService windowService = (ESelectionService) windowContext
				.get(ESelectionService.class.getName());
		EPartService partService = (EPartService) windowContext
				.get(EPartService.class.getName());
		Object selectionB = new Object();
		SelectionListener listener = new SelectionListener();
		windowService.addSelectionListener("partB", listener); 
		partService.activate(partA);
		assertNull(listener.getPart());
		assertNull(listener.getSelection());
		listener.reset();
		serviceB.setSelection(selectionB);
		assertEquals(partB, listener.getPart());
		assertEquals(selectionB, listener.getSelection());