### Question:
XPathUtil { public static XMLGregorianCalendar convertDateToXmlDate(Date date) { try { GregorianCalendar fromDate = new GregorianCalendar(); fromDate.setTime(date); return DatatypeFactory.newInstance().newXMLGregorianCalendar(fromDate); } catch (DatatypeConfigurationException e) { throw new RuntimeException(e); } } private  XPathUtil(); static Document createDocument(InputStream content); static Document createDocument(String content); static Document createDocument(String content, String charset); static DocumentBuilder getBuilder(); static String getDocumentComment(Document doc); static NodeList getXPathResult(Node node, String namespacePrefix, String namespaceURI, String expression); static NodeList getXPathResult(Node node, Map<String, String> namespaceMap, String expression); static String getFirstValue(NodeList nodes); static List<String> getValues(NodeList nodes); static void appendXmlFragment(Node parent, String fragment); static String getXml(Node node); static String getXml(Node node, boolean indentXml, int indentSize); static XMLGregorianCalendar convertDateToXmlDate(Date date); static String lookupParameterValue(String key, String string); static String normalizeXmlString(String xml);  }### Answer:
@Test public void testXMLDate() { System.err.println(XPathUtil.convertDateToXmlDate(new Date())); }