ConstraintMapping mapping = config.createConstraintMapping();
mapping.type( Bar.class )
.property( "property", FIELD )
.ignoreAnnotations()
.constraint( new NullDef() );
config.addMapping( mapping );
validator = config.buildValidatorFactory().getValidator();
violations = validator.validate( new Bar() );
assertNumberOfViolations( violations, 0 );