@SuppressWarnings("unchecked")
@Test
public void validator_with_no_constraint() throws Exception
{
ValidationMessagesSource messagesSource = mockValidationMessagesSource();
Validator validator = mockValidator();
TypeCoercer coercer = mockTypeCoercer();
FieldComponent field = newFieldComponent();
Messages messages = mockMessages();
MessageFormatter formatter = mockMessageFormatter();
Object inputValue = new Object();
ComponentResources resources = mockComponentResources();
Messages containerMessages = mockMessages();
FormSupport fs = mockFormSupport();
Map<String, Validator> map = singletonMap("required", validator);
train_getConstraintType(validator, null);
train_getFormValidationId(fs, "form");
train_getComponentResources(field, resources);
train_getId(resources, "fred");
train_getContainerMessages(resources, containerMessages);
train_contains(containerMessages, "form-fred-required-message", false);
train_contains(containerMessages, "fred-required-message", false);
train_getLocale(resources, Locale.FRENCH);
train_getValidationMessages(messagesSource, Locale.FRENCH, messages);
train_getMessageKey(validator, "key");
train_getMessageFormatter(messages, "key", formatter);
train_isRequired(validator, false);
train_getValueType(validator, Object.class);
validator.validate(field, null, formatter, inputValue);
replay();
FieldValidatorSource source = new FieldValidatorSourceImpl(messagesSource, coercer, fs, map, null);