public void setUp() throws Exception { super.setUp(); ajaxForm = (UIAjaxForm) application.createComponent(UIAjaxForm.COMPONENT_TYPE); ajaxForm.setId("form"); child = new UIInput() { public void processDecodes(FacesContext context) { childInvoked++; super.processDecodes(context); } }; child.setId("input"); child.getAttributes().put("onchange", "return true;"); child.addValidator(new TestAjaxFormValidator()); childInvoked = 0; child.setId("child"); ajaxForm.getChildren().add(child); facesContext.getViewRoot().getChildren().add(ajaxForm); }