Constraint constraint = getConstraint("testBigDecimal", scale);
assertEquals(new BigDecimal(result), proceedValidation(constraint, new BigDecimal(value)));
}
private Object proceedValidation(Constraint constraint, Object value) {
BeanWrapper constrainedBean = new BeanWrapperImpl(new TestClass());
constrainedBean.setPropertyValue(constraint.getPropertyName(), value);
Errors errors = new BindException(constrainedBean.getWrappedInstance(), constrainedBean.getWrappedClass().getName());
assertFalse(errors.hasErrors());
constraint.validate(constrainedBean.getWrappedInstance(), value, errors);
return constrainedBean.getPropertyValue(constraint.getPropertyName());