addPageRequest("http://test.com",
newHtml("Test Page", newForm("form").id("form").addInput("mail", "email", null)));
addPageRequest("http://test.com/form?mail=", newHtml("OK", ""));
AbstractDocument page = agent().get("http://test.com");
Form form = page.forms().find("#form");
FormElement email = form.find(byIdOrName("mail"));
assertTrue(email instanceof Email);
assertSame(email, form.findEmail(byName("mail")));
assertSame(email, form.findAll(byName("mail"), Email.class).get(0));
AbstractDocument response = form.submit();