@SuppressWarnings("unchecked")
@Test
public void validator_with_constraint() throws Exception
{
ValidationConstraintGenerator gen = newValidationConstraintGenerator();
FieldValidator fv = newFieldValidator();
FieldValidatorSource source = newFieldValidatorSource();
Class propertyType = Integer.class;
AnnotationProvider provider = newAnnotationProvider();
String overrideId = "overrideId";
Messages overrideMessages = newMessages();
Field field = newField();
Locale locale = Locale.ENGLISH;
train_buildConstraints(gen, propertyType, provider, "foo=bar");
train_createValidator(source, field, "foo", "bar", overrideId, overrideMessages, locale, fv);
replay();
FieldValidatorDefaultSource fieldValidatorSource = new FieldValidatorDefaultSourceImpl(gen,
source);
FieldValidator composite = fieldValidatorSource.createDefaultValidator(
field,
overrideId,
overrideMessages,
locale,
propertyType,