} catch (ResourceInitializationException e) {
rie = e;
}
assertNotNull(rie);
CollectionReader cr = CollectionReaderFactory.createReader(SingleFileXReader.class,
typeSystemDescription, SingleFileXReader.PARAM_XML_SCHEME, "XCAS",
SingleFileXReader.PARAM_FILE_NAME, "src/test/resources/data/docs/test.xcas");
Progress[] progress = cr.getProgress();
assertEquals(1, progress.length);
assertEquals(0, progress[0].getCompleted());
assertTrue(cr.hasNext());
new JCasIterator(cr).next();
progress = cr.getProgress();
assertEquals(1, progress.length);
assertEquals(1, progress[0].getCompleted());
cr.close();
cr = CollectionReaderFactory.createReader(SingleFileXReader.class,
typeSystemDescription, SingleFileXReader.PARAM_XML_SCHEME, "XCAS",
SingleFileXReader.PARAM_FILE_NAME, "test/data/docs/test.xcas");
UnsupportedOperationException uoe = null;
try {
new JCasIterator(cr).remove();
} catch (UnsupportedOperationException e) {
uoe = e;
}
assertNotNull(uoe);
cr.close();
HideOutput hideOutput = new HideOutput();
cr = CollectionReaderFactory.createReader(SingleFileXReader.class,
typeSystemDescription, SingleFileXReader.PARAM_XML_SCHEME, "XCAS",
SingleFileXReader.PARAM_FILE_NAME, "test/data/docs/bad.xcas");