request.setParameter("lastname", lastname);
// Set FORM_NAME parameter to ensure Form is submitted
request.setParameter(Form.FORM_NAME, "form");
MemoryFileItemUploadPage page = (MemoryFileItemUploadPage) container.testPage(MemoryFileItemUploadPage.class);
// Check that field parameters were processed
assertEquals(firstname, page.getForm().getFieldValue("firstname"));
assertEquals(lastname, page.getForm().getFieldValue("lastname"));
// Check that file field parameters were processed
FileField fileField1 = (FileField) page.getForm().getField("upload1");
FileField fileField2 = (FileField) page.getForm().getField("upload2");
assertEquals("upload1 success", fileField1.getFileItem().getString());
assertEquals("upload2 success", fileField2.getFileItem().getString());
container.stop();
}