### Question:
MongoPipelineBuilder extends CpeBuilder { @Override public Boolean process() throws ResourceInitializationException, CpeDescriptorException { try { add(MongoUpdateWriter.class, PARAM_DB_CONNECTION, connection, PARAM_UPDATE_ANNOTATIONS, updateAnnotations); } catch (Exception e) { throw new ResourceInitializationException(e); } return super.process(); } MongoPipelineBuilder(int nrThreads, String[] connection,
            Class<? extends Annotation>... updateAnnotations);  MongoPipelineBuilder(int nrThreads, String[] connection,
            String... updateAnnotations); @Override Boolean process();  }### Answer:
@SuppressWarnings("unchecked") @Test public void test() throws Exception { String[] conn = MongoTest.getTestConn("MongoPipelineBuilderTest"); LOG.debug("using conn {}", conn); LOG.debug("PUT SOME INITIAL DATA"); JCas jCas = UimaTests.getTestCas(); BlueCasUtil.setDocId(jCas, 17); PipelineBuilder pO = new JcasPipelineBuilder(jCas); pO.add(MongoWriter.class, BlueUima.PARAM_DB_CONNECTION, conn); pO.process(); Thread.sleep(1000); LOG.debug("ADD MORE INCREMETAL DATA: Sentence"); PipelineBuilder p1 = new MongoPipelineBuilder(2, conn, Sentence.class); p1.add(NaiveSentenceSplitterAnnotator.class); p1.process(); Thread.sleep(2000); LOG.debug("ADD MORE INCREMETAL DATA: Tokens"); PipelineBuilder p2 = new MongoPipelineBuilder(2, conn, Token.class); p2.add(WhitespaceTokenizerAnnotator.class); p2.process(); Thread.sleep(2000); LOG.debug("GET AGAIN AND SEE IF INCREMENTAL WORKED"); List<JCas> l = asList(createReader( MongoCollectionReader.class, PARAM_DB_CONNECTION, conn)); assertEquals(1, l.size()); jCas = l.get(0); assertEquals(17, BlueCasUtil.getHeaderIntDocId(jCas)); Collection<Token> t = JCasUtil.select(jCas, Token.class); assertEquals(24, t.size()); }