for (int i = 1; i <= 1000; i++) {
int index = i % scientists.length;
Formatter f = new Formatter();
String doc = f.format("{\"_id\":\"%d\", \"scientist\":\"%s\", \"fixedField\": \"fixedValue\"}", i, scientists[index]).toString();
IOHelper.close(f);
<BUG>testCollection.insert((DBObject) JSON.parse(doc), WriteConcern.SAFE);
</BUG>
}
assertEquals("Data pumping of 1000 entries did not complete entirely", 1000L, testCollection.count());
}

for (int i = 1; i <= 1000; i++) {
int index = i % scientists.length;
Formatter f = new Formatter();
String doc = f.format("{\"_id\":\"%d\", \"scientist\":\"%s\", \"fixedField\": \"fixedValue\"}", i, scientists[index]).toString();
IOHelper.close(f);
testCollection.insertOne((BasicDBObject) JSON.parse(doc));
}
assertEquals("Data pumping of 1000 entries did not complete entirely", 1000L, testCollection.count());
}
