UIComponent ccpanel = facesContext.getViewRoot().findComponent("mainForm:ccpanel");
Assert.assertNotNull(ccpanel);
UIComponent ccinnerpanel = facesContext.getViewRoot().findComponent("mainForm:ccpanel:component");
Assert.assertNotNull(ccinnerpanel);
UICommand button = (UICommand) facesContext.getViewRoot().findComponent("mainForm:ccpanel:component:increment");
Assert.assertNotNull(button);
CheckActionEventBean checkBean = facesContext.getApplication().evaluateExpressionGet(facesContext,
"#{checkActionEventBean}", CheckActionEventBean.class);
int oldcount1 = checkBean.getActionListenerCount();