// Marshal the value
writer.writeStartDocument();
writer.writeStartElement("root");
context.marshal(jaxbElement, writer);
writer.writeEndElement();
writer.writeEndDocument();
writer.flush();
assertTrue(baos.toString().indexOf("Hello World") > 0);
assertTrue(baos.toString().indexOf("</root>") > 0);
}