TransformationContext tContext = createMock(TransformationContext.class);
expect(tContext.getTargetDataType()).andReturn(targetDataType).anyTimes();
replay(tContext);
// XMLStreamReader to JAXB
XMLStreamReader2JAXB t2 = new XMLStreamReader2JAXB();
Object object2 = t2.transform(reader, tContext);
DataType sourceDataType = new DataType<Class>(Object.class, null);
sourceDataType.setMetadata(JAXBContextHelper.JAXB_CONTEXT_PATH, contextPath);
TransformationContext tContext1 = createMock(TransformationContext.class);