Conll2005Writer extends JCasAnnotator_ImplBase { @Override public void collectionProcessComplete() throws AnalysisEngineProcessException { output.close(); super.collectionProcessComplete(); }  @Override void initialize(UimaContext context); @Override void process(JCas jCas); @Override void collectionProcessComplete(); static final String PARAM_OUTPUT_FILE; }
@Test public void testCoNLL2005WriterDescriptor() throws UIMAException { try { AnalysisEngineFactory.createEngine(Conll2005Writer.class); Assert.fail("expected exception without output file parameter"); } catch (ResourceInitializationException e) { } File outputFile = new File(outputDirectory, "dev-set-result.txt"); AnalysisEngine engine = AnalysisEngineFactory.createEngine( Conll2005Writer.class, Conll2005Writer.PARAM_OUTPUT_FILE, outputFile.getPath()); engine.collectionProcessComplete(); }