IMarkupWriter writer = newWriter();
IRequestCycle cycle = newCycle(field);
MockControl validatorControl = newControl(Validator.class);
Validator validator = (Validator) validatorControl.getMock();
field.getForm();
fieldControl.setReturnValue(form);
form.isClientValidationEnabled();
formControl.setReturnValue(true);
field.getForm();
fieldControl.setReturnValue(form);
form.getName();
formControl.setReturnValue("myform");
field.getName();
fieldControl.setReturnValue("myfield");
field.getValidators();
fieldControl.setReturnValue(validator);
converter.coerceValue(validator, Iterator.class);
converterControl.setReturnValue(Collections.singleton(validator).iterator());
FormComponentContributorContext context = new FormComponentContributorContextImpl(field);
validator.renderContribution(writer, cycle, context, field);
validatorControl.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[]
{ new EqualsMatcher(), new EqualsMatcher(), new TypeMatcher(), new EqualsMatcher() }));
replayControls();