}
public void testRenderContributionsClientValidationEnabled()
{
MockControl converterControl = newControl(ValueConverter.class);
ValueConverter converter = (ValueConverter) converterControl.getMock();
ValidatableFieldSupportImpl support = new ValidatableFieldSupportImpl();
support.setThreadLocale(newThreadLocale());
support.setValueConverter(converter);
MockControl fieldControl = newControl(TranslatedField.class);
TranslatedField field = (TranslatedField) fieldControl.getMock();
MockControl formControl = newControl(IForm.class);
IForm form = (IForm) formControl.getMock();
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);