// Construct a raw surrogate pair character and confirm it outputs hex escaped, when UTF-8 too
@Test
public void test_RawSurrogatePairUTF8() throws JDOMException, IOException {
SAXBuilder builder = new SAXBuilder();
builder.setExpandEntities(true);
Document doc = builder.build(new StringReader("<?xml version=\"1.0\"?><root>\uD800\uDC00</root>"));
Format format = Format.getCompactFormat().setEncoding("UTF-8");
XMLOutputter outputter = new XMLOutputter(format);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
outputter.output(doc, baos);
String xml = baos.toString();