Assert.assertNotNull(response);
Assert.assertEquals(1, response.getNumberReturned());
Assert.assertEquals(0, response.getStartingFrom());
Assert.assertEquals(query.getWaitingRequestId(), response.getHeader().getResponseTo());
BSONObject resultObject = response.getDocuments().get(0);
Assert.assertEquals(1, resultObject.get("_id"));
Assert.assertEquals("test-name", resultObject.get("name"));
Assert.assertEquals(100, resultObject.get("integer"));
Assert.assertEquals(1000L, resultObject.get("long"));
Assert.assertArrayEquals("test binary".getBytes(), (byte[]) resultObject.get("binary"));
// Duplicate error
MongoException me = null;
try {
client.insert(