Bug 327933 Unrendering container with invalid selectedElement can cause target element to be unrendered
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
wb = new E4Workbench(application, appContext);
		wb.createAndRunUI(window);
		assertNotNull(partStack.getWidget());
		assertNotNull(sharedSashContainer.getWidget());
		assertNotNull(sashContainer.getWidget());
	}
	public void testBug326087() {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MPartSashContainer sashContainer = BasicFactoryImpl.eINSTANCE
				.createPartSashContainer();
		window.getChildren().add(sashContainer);
		window.setSelectedElement(sashContainer);
		MPartStack partStack = BasicFactoryImpl.eINSTANCE.createPartStack();
		sashContainer.getChildren().add(partStack);
		sashContainer.setSelectedElement(partStack);
		MPart partA = BasicFactoryImpl.eINSTANCE.createPart();
		partStack.getChildren().add(partA);
		partStack.setSelectedElement(partA);
		MPart partB = BasicFactoryImpl.eINSTANCE.createPart();
		partStack.getChildren().add(partB);
		application.setContext(appContext);
		appContext.set(MApplication.class.getName(), application);
		wb = new E4Workbench(application, appContext);
		wb.createAndRunUI(window);
		assertNotNull(partA.getWidget());
		assertNull(partB.getWidget());