part.setElementQName(elName);
StringWriter stringWriter = new StringWriter();
XMLOutputFactory opFactory = XMLOutputFactory.newInstance();
opFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
XMLEventWriter writer = opFactory.createXMLEventWriter(stringWriter);
Marshaller m = context.createMarshaller();
JAXBUtils.setNamespaceWrapper(mapper, m);
JAXBEncoderDecoder.marshall(m, testObject, part, writer);
writer.flush();
writer.close();
String xmlResult = stringWriter.toString();
// the following is a bit of a crock, but, to tell the truth, this test case most exists
// so that it could be examined inside the debugger to see how JAXB works.
assertTrue(xmlResult.contains("Gallia:string2"));
}