attachments[i] = new Attachments(getTestResource(TestConstants.MTOM_MESSAGE.getName()),
TestConstants.MTOM_MESSAGE.getContentType());
soapPartReader[i] = StAXUtils.createXMLStreamReader(attachments[i].getRootPartInputStream());
}
XMLStreamReader actual = new XOPEncodingStreamReader(new XOPDecodingStreamReader(soapPartReader[1], new OMAttachmentAccessorMimePartProvider(attachments[1])), contentIDGenerator, OptimizationPolicy.DEFAULT);
new XMLStreamReaderComparator(soapPartReader[0], actual).compare();
for (int i=0; i<2; i++) {
soapPartReader[i].close();
}
}