// Add a component in order to trigger a dynamic update
UIOutput testComponent = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
testComponent.setId("testId");
testComponent.setValue("Some Text");
UIForm form = (UIForm) facesContext.getViewRoot().findComponent("mainForm");
form.getChildren().add(testComponent);
executeViewHandlerRender(facesContext);
executeAfterRender(facesContext);
UIViewRoot root = new UIViewRoot();
root.setLocale(locale);
root.setRenderKitId("HTML_BASIC");
root.setViewId("/staticPage.xhtml");
ViewPoolProcessor processor = ViewPoolProcessor.getInstance(facesContext);
ViewPool viewPool = processor.getViewPool(facesContext, root);
ViewEntry entry = viewPool.popStaticOrPartialStructureView(facesContext, root);
Assert.assertNotNull(entry);
Assert.assertEquals(RestoreViewFromPoolResult.COMPLETE, entry.getResult());
//Check the component was removed
UIForm form2 = (UIForm) entry.getViewRoot().findComponent("mainForm");
Assert.assertNotNull(form2);
UIOutput testComponent2 = (UIOutput) form2.findComponent("testId");
Assert.assertNull(testComponent2);
tearDownRequest();
}