mapping.type( OrderLine.class )
.property( "id", ElementType.FIELD )
.unwrapValidatedValue( true );
Validator validator = configuration.addMapping( mapping )
.addValidatedValueHandler( new PropertyValueUnwrapper() )
.buildValidatorFactory()
.getValidator();
Set<ConstraintViolation<OrderLine>> violations = validator.validate( new OrderLine() );
assertEquals( violations.size(), 1 );