BasicDBObject key1 = (BasicDBObject) indexInfos.get(1).get("key");
BasicDBObject key2 = (BasicDBObject) indexInfos.get(2).get("key");
assertTrue("No index on the field a", key1.containsField("a") && "1".equals(key1.getString("a")));
assertTrue("No index on the field b", key2.containsField("b") && "-1".equals(key2.getString("b")));
DBObject b = dynamicCollection.findOne("testInsertDynamicityEnabledCollectionAndIndex");
assertNotNull("No record with 'testInsertDynamicityEnabledCollectionAndIndex' _id", b);
b = testCollection.findOne("testInsertDynamicityEnabledDBOnly");