// Test that an aggregate can be copied preserving all comments and ordering of delegates
XMLParser.ParsingOptions parsingOptions = new XMLParser.ParsingOptions(false);
parsingOptions.preserveComments = true;
XMLParser parser = UIMAFramework.getXMLParser();
File inFile = JUnitExtension.getFile("TextAnalysisEngineImplTest/AggregateWithManyDelegates.xml");
AnalysisEngineDescription desc = parser.parseAnalysisEngineDescription(new XMLInputSource(inFile), parsingOptions);
// Write out descriptor
File cloneFile = new File(inFile.getParentFile(), "CopyOfAggregateWithManyDelegates.xml");
BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(cloneFile));
XMLSerializer xmlSerializer = new XMLSerializer(true);