@Test public void dumpConfiguration() throws Exception { StringBuilder out = new StringBuilder(); Util.dumpConfiguration(out); String s = out.toString(); // Verify that we got a table. assertTrue(s.startsWith("<table")); // Verify that the output is well-formed. String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + s; DocumentBuilderFactory.newInstance() .newDocumentBuilder() .parse(new ByteArrayInputStream(xml.getBytes("UTF-8"))); }