public void testRenderWithNameOverride()
{
IValidationDelegate delegate = newDelegate();
MockControl formc = newControl(IForm.class);
IForm form = (IForm) formc.getMock();
MockControl cyclec = newControl(IRequestCycle.class);
IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
IMarkupWriter writer = newWriter();
IAsset image = newAsset(cycle, "image-url");
Creator creator = new Creator();
ImageSubmit submit = (ImageSubmit) creator.newInstance(ImageSubmit.class, new Object[]
{ "image", image, "nameOverride", "barney" });
train(cyclec, cycle, form);
form.getDelegate();
formc.setReturnValue(delegate);
delegate.setFormComponent(submit);
trainWasPrerendered(formc, form, writer, submit, false);
trainIsRewinding(formc, form, false);
form.getElementId(submit, "barney");
formc.setReturnValue("barney$0");
writer.beginEmpty("input");
writer.attribute("type", "image");
writer.attribute("name", "barney$0");