//check composing constraints recursively
}
}
public void testValidateComposed() {
FrenchAddress adr = new FrenchAddress();
Validator val = factory.getValidator();
Set<ConstraintViolation<FrenchAddress>> findings = val.validate(adr);
Assert.assertEquals(1, findings.size()); // with @ReportAsSingleConstraintViolation
ConstraintViolation<FrenchAddress> finding = findings.iterator().next();
Assert.assertEquals("Wrong zipcode", finding.getMessage());
adr.setZipCode("1234567");
findings = val.validate(adr);
Assert.assertEquals(0, findings.size());
adr.setZipCode("1234567234567");
findings = val.validate(adr);
Assert.assertTrue(findings.size() > 0); // too long
}