FieldValidator<Object> validate = mockFieldValidator();
Upload component = new Upload(null, validate, null, null);
MarkupWriter writer = createMarkupWriter();
writer.element("form");
FormSupport formSupport = mockFormSupport();
formSupport.setEncodingType(Upload.MULTIPART_ENCTYPE);
setField(component, "_formSupport", formSupport);
ValidationDecorator decorator = mockValidationDecorator();
setValidationDecorator(component, decorator);