@Test public void testInsertDocument() { Document doc = new Document(); doc.append("keyOne", "value11"); try { new MongoDbUtils(ADMIN_DB_NAME, mongo).insertDocument(DUMMY_COLLECTION_NAME, doc); } catch (Exception e) { log.warn("Handling network host exception\n" + e); } }
public void insertDocument(String collectionName, Document document) { log.debug("Inserting document:" + document.toJson().toString()); ArrayList<Document> docList = new ArrayList<>(); docList.add(document); _insertDocuments(collectionName, docList); log.debug("Document inserted:" + document.toJson().toString()); }
MongoDbUtils { public void insertDocument(String collectionName, Document document) { log.debug("Inserting document:" + document.toJson().toString()); ArrayList<Document> docList = new ArrayList<>(); docList.add(document); _insertDocuments(collectionName, docList); log.debug("Document inserted:" + document.toJson().toString()); } }
MongoDbUtils { public void insertDocument(String collectionName, Document document) { log.debug("Inserting document:" + document.toJson().toString()); ArrayList<Document> docList = new ArrayList<>(); docList.add(document); _insertDocuments(collectionName, docList); log.debug("Document inserted:" + document.toJson().toString()); } MongoDbUtils(String dbName);  MongoDbUtils(String dbName, MongoClient mongoClient); }
MongoDbUtils { public void insertDocument(String collectionName, Document document) { log.debug("Inserting document:" + document.toJson().toString()); ArrayList<Document> docList = new ArrayList<>(); docList.add(document); _insertDocuments(collectionName, docList); log.debug("Document inserted:" + document.toJson().toString()); } MongoDbUtils(String dbName);  MongoDbUtils(String dbName, MongoClient mongoClient); void insertDocument(String collectionName, Document document); void createCollection(String collectionName); MongoCollection<Document> getCollectionConn(String collectionName); }
MongoDbUtils { public void insertDocument(String collectionName, Document document) { log.debug("Inserting document:" + document.toJson().toString()); ArrayList<Document> docList = new ArrayList<>(); docList.add(document); _insertDocuments(collectionName, docList); log.debug("Document inserted:" + document.toJson().toString()); } MongoDbUtils(String dbName);  MongoDbUtils(String dbName, MongoClient mongoClient); void insertDocument(String collectionName, Document document); void createCollection(String collectionName); MongoCollection<Document> getCollectionConn(String collectionName);  }