@Test(expectedExceptions = UnexpectedTypeException.class, expectedExceptionsMessageRegExp = "HV000030.*")
public void explicitly_skipping_unwrapping_leads_to_exception_due_to_missing_constraint_validator() {
HibernateValidatorConfiguration configuration = ValidatorUtil.getConfiguration();
ConstraintMapping mapping = configuration.createConstraintMapping();
mapping.type( OrderLine.class )
.property( "id", ElementType.FIELD )
.unwrapValidatedValue( false );
Validator validator = configuration.addMapping( mapping )
.addValidatedValueHandler( new PropertyValueUnwrapper() )