ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
writer = StAXUtils.createXMLStreamWriter(byteArrayOutputStream);
// Serializing the body should cause the usr prefix to be pulled down from the
// envelope and written in the message.
serializer.serialize(body.getXMLStreamReaderWithoutCaching(), writer);
writer.flush();
String outputString = new String(byteArrayOutputStream.toByteArray());
assertTrue(outputString != null && !"".equals(outputString) && outputString.length() > 1);
assertTrue(outputString.indexOf(USR_DEF) > 0);