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
perspective.getChildren().add(stackA);
		perspective.setSelectedElement(stackA);
		MPart partA = BasicFactoryImpl.eINSTANCE.createPart();
		stackA.getChildren().add(partA);
		stackA.setSelectedElement(partA);
		MPlaceholder areaPlaceholder = AdvancedFactoryImpl.eINSTANCE
				.createPlaceholder();
		areaPlaceholder.setRef(area);
		area.setCurSharedRef(areaPlaceholder);
		perspective.getChildren().add(areaPlaceholder);
		MPartStack stackB = BasicFactoryImpl.eINSTANCE.createPartStack();
		area.getChildren().add(stackB);
		area.setSelectedElement(stackB);
		MPart partB1 = BasicFactoryImpl.eINSTANCE.createPart();
		stackB.getChildren().add(partB1);
		stackB.setSelectedElement(partB1);
		MPart partB2 = BasicFactoryImpl.eINSTANCE.createPart();
		stackB.getChildren().add(partB2);
		MPart partB3 = BasicFactoryImpl.eINSTANCE.createPart();
		stackB.getChildren().add(partB3);
		initialize(applicationContext, application);
		getEngine().createGui(window);
		EPartService partService = window.getContext().get(EPartService.class);
		partService.activate(partB1);
		partService.activate(partB2);
		partService.activate(partA);
		partService.activate(partB3);
		partService.hidePart(partB3);
		assertEquals(partB2, stackB.getSelectedElement());
		assertEquals(partB2, partService.getActivePart());