public static List<String> getServletNames( Document webXml )
    {
        return getNames( "servlet", webXml );
    }
@Test
    public void testGetServletNames() throws Exception
    {
        // Setup fixture.
        final Document webXml = WebXmlUtils.asDocument( new File( Objects.requireNonNull(WebXmlUtilsTest.class.getResource("/org/jivesoftware/util/test-web.xml")).toURI() ) );

        // Execute system under test.
        final List<String> results = WebXmlUtils.getServletNames( webXml );

        // Verify result.
        assertNotNull( results );
        final Iterator<String> iterator = results.iterator(); // Names should be reported in order.
        assertEquals( "PluginServlet", iterator.next() );
        assertEquals( "FaviconServlet", iterator.next() );
        assertEquals( "dwr-invoker", iterator.next() );
        assertEquals( "PluginIconServlet", iterator.next() );
        assertFalse( iterator.hasNext() );
    }