Bug 329310 Part service does not autogenerate stacks if the last container is not one
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
MPlaceholder placeholderB = AdvancedFactoryImpl.eINSTANCE
				.createPlaceholder();
		placeholderB.setRef(partB);
		partB.setCurSharedRef(placeholderB);
		stackB.getChildren().add(placeholderB);
		stackB.setSelectedElement(placeholderB);
		MPartStack stackC = BasicFactoryImpl.eINSTANCE.createPartStack();
		perspective.getChildren().add(stackC);
		MPlaceholder placeholderC = AdvancedFactoryImpl.eINSTANCE
				.createPlaceholder();
		placeholderC.setRef(partC);
		partC.setCurSharedRef(placeholderC);
		stackC.getChildren().add(placeholderC);
		stackC.setSelectedElement(placeholderC);
		initialize(applicationContext, application);
		getEngine().createGui(window);
		EPartService partService = window.getContext().get(EPartService.class);
		partService.activate(partA);
		partService.activate(partB);
		partService.activate(partA);
		partService.hidePart(partA);
		MPart activePart = partService.getActivePart();
		if (activePart == partB) {
			partService.hidePart(partB);
			assertEquals(partC, partService.getActivePart());
		} else if (activePart == partC) {
			partService.hidePart(partC);
			assertEquals(partB, partService.getActivePart());
		} else if (activePart == partA) {
			fail("Part A should have been deactivated");