@Test
public void testSearch() throws Exception {
MockEndpoint searchMock = getMockEndpoint("mock:search-result");
searchMock.expectedMessageCount(3);
searchMock.expectedPropertyReceived(Exchange.BATCH_SIZE, 3);
JobCollection jobCollection = mock(JobCollection.class);
Job jobMock = mock(Job.class);
when(service.getJobs()).thenReturn(jobCollection);
when(jobCollection.create(anyString(), any(JobArgs.class))).thenReturn(jobMock);
when(jobMock.isDone()).thenReturn(Boolean.TRUE);
InputStream stream = ConsumerTest.class.getResourceAsStream("/resultsreader_test_data.json");
when(jobMock.getResults(any(JobResultsArgs.class))).thenReturn(stream);
assertMockEndpointsSatisfied();