@Test
public void endToEndIndexXMLDocumentsStreaming() throws Exception {
xmlRouteStreaming.sendBody(new File("src/test/resources/data/books.xml"));
// Check things were indexed.
QueryResponse response = executeSolrQuery("*:*");
assertEquals(0, response.getStatus());
assertEquals(4, response.getResults().getNumFound());
// Check fields were indexed correctly.
response = executeSolrQuery("title:Learning XML");
SolrDocument doc = response.getResults().get(0);
assertEquals("Learning XML", doc.getFieldValue("id"));
assertEquals(Arrays.asList("Web", "Technology", "Computers"), doc.getFieldValue("cat"));
}