Object firstBody = mock.getExchanges().get(0).getIn().getBody();
assertTrue(firstBody instanceof DBObject);
assertEquals(301, ((DBObject) firstBody).get("increasing"));
// check that the persisted lastVal after stopping the route is 600, newton is the name of the trackingField we are using
context.stopRoute("tailableCursorConsumer3");
assertEquals(600, trackingCol.findOne(new BasicDBObject("persistentId", "darwin")).get("newton"));
}
public void assertAndResetMockEndpoint(MockEndpoint mock) throws Exception {
mock.assertIsSatisfied();