}
private void setRulesAndHibernateValidator()
{
Rules rules = new Rules(ValidatingObject.class);
Constraints c = Constraints.instance();
rules.add(c.eq("intValue", 8));
rules.add(c.eq("stringValue", "valid"));
DefaultRulesSource source = new DefaultRulesSource();
source.addRules(rules);
RulesValidator rulesValidator = new RulesValidator(model, source);
hibernateRulesValidator = new HibernateRulesValidator(model, ValidatingObject.class);
CompositeRichValidator compositeValidator = new CompositeRichValidator(rulesValidator, hibernateRulesValidator);