@Test
public void testSubmitNewJobs() throws DocumentException {

    prepareDefaultMockAnswers(SELECTIVE_HARVEST_CHANNEL, jobMock, false);
    jobDispatcher.submitNextNewJob(SELECTIVE_HARVEST_CHANNEL);
    verify(jobMock).setStatus(JobStatus.SUBMITTED);
    verify(jobMock).setSubmittedDate(any(Date.class));
    verify(jobDAO, new Times(1)).update(jobMock);
    
    verify(jmsConnection).send(crawlMessageCaptor.capture());
    
    assertTrue(jobMock == crawlMessageCaptor.getValue().getJob());
    assertEquals(HarvesterChannels.getHarvestJobChannelId(SELECTIVE_HARVEST_CHANNEL), crawlMessageCaptor.getValue()
            .getTo());
    assertEquals(harvest.getName(), crawlMessageCaptor.getValue().getOrigHarvestInfo().getOrigHarvestName());
}