FacesContext faces = FacesContext.getCurrentInstance();
UIViewRoot root = new UIViewRoot();
f.apply(faces, root);
UISelectOne one = (UISelectOne) root.findComponent("testForm:alignment");
root.processDecodes(faces);
root.processValidators(faces);
System.out.println(faces.getMessages().hasNext());
}
}