// click on the "Add new resource" button
DebugUtils.writeFile("target/testDeployWAR-beforeAdd.html", client.getPageAsText());///
client.click("actionHeaderForm:addNewContent"); // 404 if setThrowExceptionOnFailingStatusCode(true) above
// upload hellothere.war
HtmlFileInput fileInput = (HtmlFileInput) client.getElement("createContentForm:file");
fileInput.setContentType("application/war");
fileInput.setValueAttribute(System.getProperty("jsfunit.testdata") + "/war/hellothere.war");
client.click("createContentForm:addButton");
// assert that the success message appeared on the client side
assertTrue(client.getPageAsText().contains("hellothere.war created successfully"));