public void testWriteResultAsHeaderWithWriteOp() {
assertEquals(0, testCollection.count());
Object[] req = new Object[] {"{\"_id\":\"testSave1\", \"scientist\":\"Einstein\"}", "{\"_id\":\"testSave2\", \"scientist\":\"Copernicus\"}"};
Object result = template.requestBody("direct:insert", req);
assertEquals("Number of records persisted must be 2", 2, testCollection.count());
<BUG>final DBObject record1 = testCollection.findOne("testSave1");
</BUG>
assertEquals("Scientist field of 'testSave1' must equal 'Einstein'", "Einstein", record1.get("scientist"));
record1.put("scientist", "Darwin");
Exchange resultExch = template.request("direct:save", new Processor() {

public void testWriteResultAsHeaderWithWriteOp() {
assertEquals(0, testCollection.count());
Object[] req = new Object[] {"{\"_id\":\"testSave1\", \"scientist\":\"Einstein\"}", "{\"_id\":\"testSave2\", \"scientist\":\"Copernicus\"}"};
Object result = template.requestBody("direct:insert", req);
assertEquals("Number of records persisted must be 2", 2, testCollection.count());
final DBObject record1 = testCollection.find(new BasicDBObject("_id", "testSave1")).first();
assertEquals("Scientist field of 'testSave1' must equal 'Einstein'", "Einstein", record1.get("scientist"));
record1.put("scientist", "Darwin");
Exchange resultExch = template.request("direct:save", new Processor() {
