//Check TestAnnotator fields only at the very end of processing,
//we can't test from the threads themsleves since the state of
//these fields is nondeterministic during the multithreaded processing.
assertEquals("testing...", TestAnnotator.getLastDocument());
ResultSpecification resultSpec = new ResultSpecification_impl(TestAnnotator.getLastResultSpec().getTypeSystem());
resultSpec.addResultType("NamedEntity", true);
assertEquals(resultSpec, TestAnnotator.getLastResultSpec());
} catch (Exception e) {
JUnitExtension.handleException(e);
}