### Question:
XpathUtils { public static String asString(String expression, Node node) throws XPathExpressionException { return evaluateAsString(expression, node); }  static Document documentFrom(InputStream is); static Document documentFrom(String xml); static Document documentFrom(URL url); static Double asDouble(String expression, Node node); static String asString(String expression, Node node); static Integer asInteger(String expression, Node node); static Boolean asBoolean(String expression, Node node); static Float asFloat(String expression, Node node); static Long asLong(String expression, Node node); static Byte asByte(String expression, Node node); static Date asDate(String expression, Node node); static ByteBuffer asByteBuffer(String expression, Node node); static boolean isEmpty(Node node); static int nodeLength(NodeList list); static Node asNode(String nodeName, Node node); static XPath xpath();  }### Answer:
@Test public void testAsString() throws Exception { Document document = XpathUtils.documentFrom(DOCUMENT); assertEquals("Boo", XpathUtils.asString("Foo/Title", document)); assertEquals("", XpathUtils.asString("Foo/Empty", document)); assertEquals("Bar", XpathUtils.asString("Foo/Count/@Foo", document)); Document namespaceDocument = XpathUtils.documentFrom(DOCUMENT_WITH_NAMESPACE); assertEquals("174.129.242.223", XpathUtils.asString("/AllocateAddressResponse/publicIp", namespaceDocument)); }