IForm form = newMock(IForm.class);
IMarkupWriter writer = newWriter();
Validator validator = newMock(Validator.class);
expect(field.getForm()).andReturn(form);
expect(form.isClientValidationEnabled()).andReturn(true);
support.setThreadLocale(newThreadLocale());
support.setValueConverter(converter);
expect(field.getForm()).andReturn(form);
expect(form.getName()).andReturn("myform");
expect(field.getValidators()).andReturn(validator);
expect(converter.coerceValue(validator, Iterator.class))
.andReturn(Collections.singleton(validator).iterator());
IRequestCycle cycle = newCycle(field);
validator.renderContribution(eq(writer), eq(cycle),
isA(FormComponentContributorContext.class), eq(field));
replay();
support.renderContributions(field, writer, cycle);