UINamingContainer compositeComponent1 = (UINamingContainer) panelGroup1.getChildren().get(0);
Assert.assertNotNull(compositeComponent1);
UINamingContainer compositeComponent1target = (UINamingContainer) compositeComponent1.findComponent("simpleAttributeMethodExpressionTarget");
Assert.assertNotNull(compositeComponent1target);
UICommand button1target = (UICommand) compositeComponent1target.findComponent("testComponent");
Assert.assertNotNull(button1target);
Assert.assertNotNull(button1target.getActionListeners());
Assert.assertEquals(1, button1target.getActionListeners().length);
bean.setActionListener1Called(false);
button1target.getActionListeners()[0].processAction(new ActionEvent(button1target));
Assert.assertTrue(bean.isActionListener1Called());
UICommand button1notarget = (UICommand) compositeComponent1target.findComponent("testComponentNoTarget");
Assert.assertNotNull(button1notarget);
Assert.assertNotNull(button1notarget.getActionListeners());
Assert.assertEquals(1, button1notarget.getActionListeners().length);
compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
compositeComponent1target.pushComponentToEL(facesContext, compositeComponent1target);
bean.setActionListener1Called(false);
button1notarget.getActionListeners()[0].processAction(new ActionEvent(button1notarget));
Assert.assertTrue(bean.isActionListener1Called());
compositeComponent1target.popComponentFromEL(facesContext);
compositeComponent1.popComponentFromEL(facesContext);
UINamingContainer compositeComponent1notarget = (UINamingContainer) compositeComponent1.findComponent("simpleAttributeMethodExpressionNoTarget");
Assert.assertNotNull(compositeComponent1notarget);
UICommand buttonnotarget1target = (UICommand) compositeComponent1notarget.findComponent("testComponent");
Assert.assertNotNull(buttonnotarget1target);
Assert.assertNotNull(buttonnotarget1target.getActionListeners());
Assert.assertEquals(1, buttonnotarget1target.getActionListeners().length);
compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
compositeComponent1notarget.pushComponentToEL(facesContext, compositeComponent1notarget);
bean.setActionListener1Called(false);
buttonnotarget1target.getActionListeners()[0].processAction(new ActionEvent(buttonnotarget1target));
Assert.assertTrue(bean.isActionListener1Called());
compositeComponent1notarget.popComponentFromEL(facesContext);
compositeComponent1.popComponentFromEL(facesContext);
UICommand buttonnotarget1notarget = (UICommand) compositeComponent1notarget.findComponent("testComponentNoTarget");
Assert.assertNotNull(buttonnotarget1notarget);
Assert.assertNotNull(buttonnotarget1notarget.getActionListeners());
Assert.assertEquals(1, buttonnotarget1notarget.getActionListeners().length);
compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
compositeComponent1notarget.pushComponentToEL(facesContext, compositeComponent1notarget);
bean.setActionListener1Called(false);
buttonnotarget1notarget.getActionListeners()[0].processAction(new ActionEvent(buttonnotarget1notarget));
Assert.assertTrue(bean.isActionListener1Called());
compositeComponent1notarget.popComponentFromEL(facesContext);
compositeComponent1.popComponentFromEL(facesContext);
UIComponent panelGroup2 = root.findComponent("testGroup2");
Assert.assertNotNull(panelGroup2);
UINamingContainer compositeComponent2 = (UINamingContainer) panelGroup2.getChildren().get(0);
Assert.assertNotNull(compositeComponent2);
UINamingContainer compositeComponent2target = (UINamingContainer) compositeComponent2.findComponent("simpleAttributeMethodExpressionTarget");
Assert.assertNotNull(compositeComponent2target);
UICommand button2target = (UICommand) compositeComponent2target.findComponent("testComponent");
Assert.assertNotNull(button2target);
Assert.assertNotNull(button2target.getActionListeners());
Assert.assertEquals(1, button2target.getActionListeners().length);
bean.setActionListener2Called(false);
button2target.getActionListeners()[0].processAction(new ActionEvent(button2target));
Assert.assertTrue(bean.isActionListener2Called());
UICommand button2notarget = (UICommand) compositeComponent2target.findComponent("testComponentNoTarget");
Assert.assertNotNull(button2notarget);
Assert.assertNotNull(button2notarget.getActionListeners());
Assert.assertEquals(1, button2notarget.getActionListeners().length);
compositeComponent2.pushComponentToEL(facesContext, compositeComponent2);
compositeComponent2target.pushComponentToEL(facesContext, compositeComponent2target);
bean.setActionListener2Called(false);
button2notarget.getActionListeners()[0].processAction(new ActionEvent(button2notarget));
Assert.assertTrue(bean.isActionListener2Called());
compositeComponent2target.popComponentFromEL(facesContext);
compositeComponent2.popComponentFromEL(facesContext);
UINamingContainer compositeComponent2notarget = (UINamingContainer) compositeComponent2.findComponent("simpleAttributeMethodExpressionNoTarget");
Assert.assertNotNull(compositeComponent2notarget);
UICommand buttonnotarget2target = (UICommand) compositeComponent2notarget.findComponent("testComponent");
Assert.assertNotNull(buttonnotarget2target);
Assert.assertNotNull(buttonnotarget2target.getActionListeners());
Assert.assertEquals(1, buttonnotarget2target.getActionListeners().length);
compositeComponent2.pushComponentToEL(facesContext, compositeComponent2);
compositeComponent2notarget.pushComponentToEL(facesContext, compositeComponent2notarget);
bean.setActionListener2Called(false);
buttonnotarget2target.getActionListeners()[0].processAction(new ActionEvent(buttonnotarget2target));
Assert.assertTrue(bean.isActionListener2Called());
compositeComponent2notarget.popComponentFromEL(facesContext);
compositeComponent2.popComponentFromEL(facesContext);
UICommand buttonnotarget2notarget = (UICommand) compositeComponent2notarget.findComponent("testComponentNoTarget");
Assert.assertNotNull(buttonnotarget2notarget);
Assert.assertNotNull(buttonnotarget2notarget.getActionListeners());
Assert.assertEquals(1, buttonnotarget2notarget.getActionListeners().length);
compositeComponent2.pushComponentToEL(facesContext, compositeComponent2);
compositeComponent2notarget.pushComponentToEL(facesContext, compositeComponent2notarget);
bean.setActionListener2Called(false);
buttonnotarget2notarget.getActionListeners()[0].processAction(new ActionEvent(buttonnotarget2notarget));
Assert.assertTrue(bean.isActionListener2Called());
compositeComponent2notarget.popComponentFromEL(facesContext);
compositeComponent2.popComponentFromEL(facesContext);
}