ESHttpUtils { @NotNull public static XPath createXPath(@Nullable final String... values) { final NamespaceContext context = new NamespaceContextMap(values); final XPath xPath = XPathFactory.newInstance().newXPath(); xPath.setNamespaceContext(context); return xPath; } private  ESHttpUtils(); @Nullable static String findContentText(final Node rootNode, final XPath xPath, final String expression); @Nullable static Integer findContentInteger(final Node rootNode, final XPath xPath,
            final String expression); @Nullable static Node findNode(@NotNull final Node rootNode, @NotNull final XPath xPath,
            @NotNull final String expression); @Nullable static NodeList findNodes(@NotNull final Node rootNode, @NotNull final XPath xPath,
            @NotNull final String expression); @NotNull static Document parseDocument(@NotNull final DocumentBuilder builder,
            @NotNull final InputStream inputStream); @NotNull static XPath createXPath(@Nullable final String... values); @NotNull static DocumentBuilder createDocumentBuilder(); static String yesNo(final boolean b);  }
@Test public void testCreateXPath() { final String[] namespaces = new String[] { "abc", "http: "http: final XPath xpath = ESHttpUtils.createXPath(namespaces); assertThat(xpath.getNamespaceContext()).isNotNull(); final NamespaceContext nsc = xpath.getNamespaceContext(); assertThat(nsc.getNamespaceURI("abc")).isEqualTo("http: assertThat(nsc.getNamespaceURI("def")).isEqualTo("http: }