ESHttpUtils { @Nullable public static Integer findContentInteger(final Node rootNode, final XPath xPath, final String expression) { final Node node = findNode(rootNode, xPath, expression); if (node == null) { return null; } final String str = node.getTextContent(); return Integer.valueOf(str); } 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 testFindContentInteger() throws IOException { final InputStream in = this.getClass().getResourceAsStream("/atom-feed-event-1.xml"); try { doc = ESHttpUtils.parseDocument(ESHttpUtils.createDocumentBuilder(), in); xpath = ESHttpUtils.createXPath("atom", "http: final Integer value = ESHttpUtils.findContentInteger(doc, xpath, "/atom:entry/atom:content/eventNumber"); assertThat(value).isEqualTo(1); } finally { in.close(); } }