+ " <servlet-name>s1</servlet-name>"
+ " <servlet-class>sclass1</servlet-class>"
+ " </servlet>"
+ "</web-app>";
Document doc = builder.parse(new ByteArrayInputStream(xml.getBytes()));
WebXml webXml = new WebXml(doc);
webXml.addServletInitParam("s1", "s1param1", "s1param1value");
webXml.addServletInitParam("s1", "s1param2", "s1param2value");
webXml.addServletInitParam("s1", "s1param3", "s1param3value");
Iterator initParams = webXml.getServletInitParamNames("s1");
assertEquals("s1param1", initParams.next());
assertEquals("s1param2", initParams.next());
assertEquals("s1param3", initParams.next());
assertTrue(!initParams.hasNext());
}