DOMUtils { public static Document bytesToDocument(byte[] bytes) { String xacmlString; try { xacmlString = new String(bytes, DEFAULT_ENCODING); } catch (final UnsupportedEncodingException e) { throw new DOMUtilsException(e); } return xmlToDocument(xacmlString); }  static Document bytesToDocument(byte[] bytes); static byte[] documentToBytes(Document xmlDocument); static String documentToXml(Document xmlDocument); static Optional<Node> getNode(Document xmlDocument,
			String xPathExpr, String... arguments); static Optional<NodeList> getNodeList(Document xmlDocument,
			String xPathExpr, String... arguments); static Document xmlToDocument(String xmlString); static final String DEFAULT_ENCODING; }
@Test public void testBytesToDocument() { final Document d1 = DOMUtils.bytesToDocument(POLICY_BYTES1); final Document d2 = DOMUtils.bytesToDocument(POLICY_BYTES2); assertNotNull(d1); assertNotNull(d2); }