Bug 324839 Secondary part selected by EPS due to initially selected part being hidden and removed does not get rendered
1. Have a stack with two parts in it, the selected one has been rendered, the other one is not. 2. Hide the selected part using the EPS. 3. The other part is now the selected part, but it is not rendered.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
EPartService.class.getName());
		service.activate(partB);
		assertEquals(1, tabFolder.getSelectionIndex());
		service.activate(partA);
		partA.setToBeRendered(false);
		assertEquals(1, tabFolder.getItemCount());
		assertEquals(0, tabFolder.getSelectionIndex());
		assertEquals(partB, stack.getSelectedElement());
	}
	public void testCreateGuiBug301950() {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		final MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setContext(appContext);
		appContext.set(MApplication.class.getName(), application);
		wb = new E4Workbench(application, appContext);
		wb.createAndRunUI(window);
		MPart part = BasicFactoryImpl.eINSTANCE.createPart();
		part.setContributionURI("platform:/plugin/org.eclipse.e4.ui.tests/org.eclipse.e4.ui.tests.workbench.SampleView");
		window.getChildren().add(part);
		IPresentationEngine renderer = (IPresentationEngine) appContext
				.get(IPresentationEngine.class.getName());
		renderer.createGui(part);
		renderer.removeGui(part);
		while (Display.getCurrent().readAndDispatch()) {
			
		}
	}
	public void testRemoveGuiBug307578() {