constraintViolations = validator.validateValue( Address.class, "city", null, Default.class );
assertCorrectNumberOfViolations( constraintViolations, 1 );
assertCorrectConstraintTypes( constraintViolations, NotNull.class );
assertCorrectPropertyPaths( constraintViolations, "city" );
constraintViolations = validator.validateValue( Address.class, "city", null, Address.Minimal.class );
assertCorrectNumberOfViolations( constraintViolations, 0 );
constraintViolations = validator.validateValue( Address.class, "street", null, Address.Minimal.class );
assertCorrectNumberOfViolations( constraintViolations, 1 );
assertCorrectConstraintTypes( constraintViolations, NotEmpty.class );