ESHttpUtils { @Nullable public static Node findNode(@NotNull final Node rootNode, @NotNull final XPath xPath, @NotNull final String expression) { Contract.requireArgNotNull("rootNode", rootNode); Contract.requireArgNotNull("xPath", xPath); Contract.requireArgNotNull("expression", expression); try { return (Node) xPath.compile(expression).evaluate(rootNode, XPathConstants.NODE); } catch (final XPathExpressionException ex) { throw new RuntimeException("Failed to read node: " + expression, ex); } } 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 testFindNode() { final Node node = ESHttpUtils.findNode(doc, xpath, "/ns:feed/ns:entry"); assertThat(node).isNotNull(); }