}
@Test
public void begin_render_writes_input_tag() throws Exception
{
MarkupWriter writer = createMarkupWriter();
writer.element("form");
FormSupport formSupport = mockFormSupport();
formSupport.setEncodingType(Upload.MULTIPART_ENCTYPE);
replay();
Upload component = new Upload();
setValidationDecorator(component, new StubValidationDecorator());
setFormSupport(component, 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);