question: public void testSetLoginConfigAdding ( ) throws Exception { String xml = WEBAPP_TEST_HEADER + "</web-app>" ; WebXml webXml = WebXmlIo . parseWebXml ( new ByteArrayInputStream ( xml . getBytes ( "UTF-8" ) ) , getEntityResolver ( ) ) ; WebXmlUtils . setLoginConfig ( webXml , "BASIC" , "Test Realm" ) ; assertTrue ( WebXmlUtils . hasLoginConfig ( webXml ) ) ; assertEquals ( "BASIC" , WebXmlUtils . getLoginConfigAuthMethod ( webXml ) ) ; }
target:  Tests retrieving the authentication method from a descriptor.