@Test
public void testInsertBsonInputStream() {
assertEquals(0, testCollection.count());
DefaultDBEncoder encoder = new DefaultDBEncoder();
BSONObject bsonObject = new BasicDBObject();
bsonObject.put("_id", "testInsertBsonString");
Object result = template.requestBody("direct:insertJsonString", new ByteArrayInputStream(encoder.encode(bsonObject)));
assertTrue(result instanceof WriteResult);
DBObject b = testCollection.findOne("testInsertBsonString");
assertNotNull("No record with 'testInsertBsonString' _id", b);
}