### Question:
ControlFileProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { processUsingNewBatchJob(exchange); MongoTrackingAspect.aspectOf().reset(); }  @Override void process(Exchange exchange); static final BatchJobStageType BATCH_JOB_STAGE; }### Answer:
@Test public void shouldAcceptExchangeObjectReadExchangeControlFileAndSetExchangeBatchJob() throws Exception { Exchange preObject = new DefaultExchange(new DefaultCamelContext()); WorkNote workNote = Mockito.mock(WorkNote.class); String batchJobId = NewBatchJob.createId("InterchangeStudentCsv.ctl"); NewBatchJob mockedJob = Mockito.mock(NewBatchJob.class); Mockito.when(mockedJob.getBatchProperties()).thenReturn(new HashMap <String, String>()); Mockito.when(workNote.getBatchJobId()).thenReturn(batchJobId); Mockito.when(mockedBatchJobDAO.findBatchJobById(Matchers.eq(batchJobId))).thenReturn(mockedJob); preObject.getIn().setBody(workNote); processor.process(preObject); boolean hasErrors = (Boolean) preObject.getIn().getHeader("hasErrors"); assertNotNull("header [hasErrors] not set", hasErrors); }