}
@Test
public void begin_render_writes_input_tag() throws Exception
{
MarkupWriter writer = createMarkupWriter();
writer.element("form");
FormSupport formSupport = mockFormSupport();
ComponentResources resources = mockComponentResources();
formSupport.setEncodingType(Upload.MULTIPART_ENCTYPE);
resources.renderInformalParameters(writer);
replay();
Upload component = new Upload(null, null, null, null, resources);
component.injectDecorator(new StubValidationDecorator());
component.injectFormSupport(formSupport);
component.beginRender(writer);
Element element = writer.getElement();
assertNotNull(element);
assertEquals(element.getName(), "input");
assertEquals(element.getAttribute("type"), "file");
// assertEquals(element.getAttribute("name"),null);
// assertEquals(element.getAttribute("id"),null);