protected DataType<?> getTargetDataType() {
return new DataTypeImpl<Class<XMLStreamReader>>(XMLStreamReader.class, XMLStreamReader.class);
}
public final void testTransform() throws XMLStreamException {
XMLDocument document =
helperContext.getXMLHelper().createDocument(dataObject,
ORDER_QNAME.getNamespaceURI(),
ORDER_QNAME.getLocalPart());
XMLStreamReader reader = new XMLDocument2XMLStreamReader().transform(document, context);
XMLDocument document2 = new XMLStreamReader2XMLDocument().transform(reader, reversedContext);
Assert.assertEquals(ORDER_QNAME.getNamespaceURI(), document2.getRootElementURI());
Assert.assertEquals(ORDER_QNAME.getLocalPart(), document2.getRootElementName());
Assert.assertTrue(document2.getRootObject() instanceof PurchaseOrderType);
}