public void testAddServletWithNameAndJspFile() throws Exception {
  String xml=WEBAPP_TEST_HEADER + "" + "</web-app>";
  WebXml webXml=WebXmlIo.parseWebXml(new ByteArrayInputStream(xml.getBytes("UTF-8")),getEntityResolver());
  WebXmlUtils.addJspFile(webXml,"s1","s1.jsp");
  assertTrue(WebXmlUtils.hasServlet(webXml,"s1"));
}

public void testAddServletWithNameAndJspFile ( ) throws Exception { String xml = WEBAPP_TEST_HEADER + "" + "</web-app>" ; WebXml webXml = WebXmlIo . parseWebXml ( new ByteArrayInputStream ( xml . getBytes ( "UTF-8" ) ) , getEntityResolver ( ) ) ; WebXmlUtils . addJspFile ( webXml , "s1" , "s1.jsp" ) ; assertTrue ( WebXmlUtils . hasServlet ( webXml , "s1" ) ) ; }
tests whether a single servlet can be added using the method that takes a string for the servlet name and a string for the jsp file .
