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
.createPerspective();
		perspectiveStack.getChildren().add(perspectiveB);
		MPlaceholder placeholderA2 = AdvancedFactoryImpl.eINSTANCE
				.createPlaceholder();
		placeholderA2.setRef(partA);
		perspectiveB.getChildren().add(placeholderA2);
		perspectiveB.setSelectedElement(placeholderA2);
		MPartStack partStack = BasicFactoryImpl.eINSTANCE.createPartStack();
		perspectiveB.getChildren().add(partStack);
		MPlaceholder placeholderB2 = AdvancedFactoryImpl.eINSTANCE
				.createPlaceholder();
		placeholderB2.setRef(partB);
		partStack.getChildren().add(placeholderB2);
		MPart partD = BasicFactoryImpl.eINSTANCE.createPart();
		partStack.getChildren().add(partD);
		partStack.setSelectedElement(partD);
		MPlaceholder placeholderC2 = AdvancedFactoryImpl.eINSTANCE
				.createPlaceholder();
		placeholderC2.setRef(partC);
		perspectiveB.getChildren().add(placeholderC2);
		initialize(applicationContext, application);
		getEngine().createGui(window);
		EPartService partService = window.getContext().get(EPartService.class);
		partService.activate(partA);
		partService.activate(partC);
		partService.activate(partB);
		partService.activate(partA);
		partService.switchPerspective(perspectiveB);
		assertEquals(partA, partService.getActivePart());
		partService.hidePart(partA);