addPageRequest("http://test.com",
newHtml("Test Page", newForm("form").method("post").id("form").enctype("multipart/form-data").addFileInput("fileUpload", "")));
addPageRequest("POST", "http://test.com/form", newHtml("OK", ""));
AbstractDocument page = agent().get("http://test.com");
Form form = page.forms().find("#form");
form.findUpload(byIdOrName("fileUpload")).setValue(tmpFile);
AbstractDocument response = form.submit();
assertEquals("OK", response.getTitle());
}