question: public void testGetServletNamesForJspFileWithSingleServlet ( ) throws Exception { String xml = WEBAPP_TEST_HEADER + "  <servlet>" + "    <servlet-name>s1</servlet-name>" + "    <jsp-file>/s1.jsp</jsp-file>" + "  </servlet>" + "</web-app>" ; WebXml webXml = WebXmlIo . parseWebXml ( new ByteArrayInputStream ( xml . getBytes ( "UTF-8" ) ) , getEntityResolver ( ) ) ; List < String > servletNames = WebXmlUtils . getServletNamesForJspFile ( webXml , "/s1.jsp" ) ; assertEquals ( 1 , servletNames . size ( ) ) ; assertEquals ( "s1" , servletNames . get ( 0 ) ) ; }
target:  Tests whether a retrieving a servlet name by the path of the JSP file implementing the servlet works correctly for a descriptor with a single servlet definition.