assertNotNull(xpath.evaluate("//saml2:NameID/@NameQualifier", doc, XPathConstants.NODE));
}
private void initXpath() {
factory = XPathFactory.newInstance();
namespaceContext = new NamespaceContextImpl();
namespaceContext.startPrefixMapping("saml1", "urn:oasis:names:tc:SAML:1.0:assertion");
namespaceContext.startPrefixMapping("saml2", "urn:oasis:names:tc:SAML:2.0:assertion");
namespaceContext.startPrefixMapping("ds", "http://www.w3.org/2000/09/xmldsig#");
xpath = factory.newXPath();
xpath.setNamespaceContext(namespaceContext);