question: public void testMergeOneServletIntoEmptyDocument ( ) throws Exception { String srcXml = "<web-app></web-app>" ; WebXml srcWebXml = WebXmlIo . parseWebXml ( new ByteArrayInputStream ( srcXml . getBytes ( "UTF-8" ) ) , null ) ; String mergeXml = "<web-app>" + "  <servlet>" + "    <servlet-name>s1</servlet-name>" + "    <servlet-class>sclass1</servlet-class>" + "  </servlet>" + "</web-app>" ; WebXml mergeWebXml = WebXmlIo . parseWebXml ( new ByteArrayInputStream ( mergeXml . getBytes ( "UTF-8" ) ) , null ) ; WebXmlMerger merger = new WebXmlMerger ( srcWebXml ) ; merger . merge ( mergeWebXml ) ; assertTrue ( WebXmlUtils . hasServlet ( srcWebXml , "s1" ) ) ; }
target:  Tests whether a single servlet is correctly merged into an empty descriptor.