binder.bind(pvs);
Errors errors = binder.getBindingResult();
FieldError ageError = errors.getFieldError("age");
assertEquals("typeMismatch", ageError.getCode());
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
messageSource.setBasename("org.springframework.validation.messages1");
String msg = messageSource.getMessage(ageError, Locale.getDefault());
assertEquals("Field age did not have correct type", msg);
messageSource = new ResourceBundleMessageSource();
messageSource.setBasename("org.springframework.validation.messages2");
msg = messageSource.getMessage(ageError, Locale.getDefault());
assertEquals("Field Age did not have correct type", msg);
messageSource = new ResourceBundleMessageSource();
messageSource.setBasename("org.springframework.validation.messages3");
msg = messageSource.getMessage(ageError, Locale.getDefault());
assertEquals("Field Person Age did not have correct type", msg);
}