Assert.assertEquals("c", itemC_1.getValue());
itemC_1.getAttributes().put("prop", "c");
executeViewHandlerRender(facesContext);
UICommand button = (UICommand) facesContext.getViewRoot().findComponent("mainForm:postback");
submit(button);
processLifecycleExecute();
UIOutput itemA_2 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_a");
Assert.assertNotNull(itemA_2);
Assert.assertEquals("a", itemA_2.getValue());
Assert.assertEquals("a", itemA_2.getAttributes().get("prop"));
UIOutput itemB_2 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_b");
Assert.assertNotNull(itemB_2);
Assert.assertEquals("b", itemB_2.getValue());
Assert.assertEquals("b", itemB_2.getAttributes().get("prop"));
UIOutput itemC_2 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_c");
Assert.assertNotNull(itemC_2);
Assert.assertEquals("c", itemC_2.getValue());
Assert.assertEquals("c", itemC_2.getAttributes().get("prop"));
ForEachBean bean = facesContext.getApplication().evaluateExpressionGet(facesContext, "#{forEachBean}",
ForEachBean.class);
bean.addFirst();
bean.addMiddle();
bean.removeLast();
executeBeforeRender(facesContext);
executeBuildViewCycle(facesContext);
UIOutput itemA_3 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_a");
Assert.assertNotNull(itemA_3);
Assert.assertEquals("a", itemA_3.getValue());
Assert.assertEquals("a", itemA_3.getAttributes().get("prop"));
UIOutput itemB_3 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_b");
Assert.assertNotNull(itemB_3);
Assert.assertEquals("b", itemB_3.getValue());
Assert.assertEquals("b", itemB_3.getAttributes().get("prop"));
UIOutput itemC_3 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_c");
Assert.assertNull(itemC_3);
UIOutput itemZ_3 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_z");
Assert.assertNotNull(itemZ_3);
Assert.assertEquals("z", itemZ_3.getValue());
Assert.assertNull(itemZ_3.getAttributes().get("prop"));
UIOutput itemX_3 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_x");
Assert.assertNotNull(itemX_3);
Assert.assertEquals("x", itemX_3.getValue());
Assert.assertNull(itemX_3.getAttributes().get("prop"));
executeViewHandlerRender(facesContext);
UICommand button2 = (UICommand) facesContext.getViewRoot().findComponent("mainForm:postback");
submit(button2);
processLifecycleExecute();
UIOutput itemA_4 = (UIOutput) facesContext.getViewRoot().findComponent("mainForm:item_a");