XmlNamespaceContext implements NamespaceContext { @Override public String getNamespaceURI(String prefix) { return Opt.nul(prefixToUri.get(prefix)).getOr(XMLConstants.NULL_NS_URI); } XmlNamespaceContext(Map<String, String> prefixToUri); static XmlNamespaceContext mk(Map<String, String> prefixToUri); static XmlNamespaceContext mk(XmlNamespaceBinding... bindings); static XmlNamespaceContext mk(String prefix, String namespaceUri); static XmlNamespaceContext mk(List<XmlNamespaceBinding> bindings); static XmlNamespaceContext mk(Stream<XmlNamespaceBinding> bindings); @Override String getNamespaceURI(String prefix); @Override String getPrefix(String uri); @Override Iterator getPrefixes(String uri); List<XmlNamespaceBinding> getBindings(); XmlNamespaceContext add(XmlNamespaceBinding... bindings); XmlNamespaceContext add(XmlNamespaceContext bindings); NamespaceContext merge(final NamespaceContext precedence); static NamespaceContext merge(final NamespaceContext a, final NamespaceContext b);  }
@Test public void testGetNamespaceURI() throws Exception { testGetNamespaceURI(new XmlNamespaceContext(Collections.map( tuple("foo", "http: tuple("bar", "http: testGetNamespaceURI(XmlNamespaceContext.mk(asList( new XmlNamespaceBinding("foo", "http: new XmlNamespaceBinding("bar", "http: }