File warFile = new File("/path/to/simple.war");
WarArchive war = new DefaultWarArchive(warFile);
// Verify existence of class inside the WAR
assertTrue(war.containsClass("test.Test"));
// Verify version of the Servlet specifications used in web.xml
WebXml webXml = war.getWebXml();
assertEquals(WebXmlVersion.V2_3, webXml.getVersion());
// Add a context-param element in web.xml
Element contextParamElement =
createContextParamElement(doc, "param", "value");
webXml.addContextParam(contextParamElement);
assertTrue(webXml.hasContextParam("param"));
[...]