Upload extends AbstractField { public void afterRender(MarkupWriter writer) { writer.end(); } Upload();   Upload(UploadedFile value, FieldValidator<Object> validate, MultipartDecoder decoder, ValidationTracker tracker,
           ComponentResources resources, FieldValidationSupport fieldValidationSupport); @Override boolean isRequired(); void afterRender(MarkupWriter writer); UploadedFile getValue(); static final String MULTIPART_ENCTYPE; }
@Test public void after_render_closes_element() throws Exception { Upload component = new Upload(); MarkupWriter writer = mockMarkupWriter(); expect(writer.end()).andReturn(null); replay(); component.afterRender(writer); verify(); }