MongoDBDocumentCollectionManagerFactory implements DocumentCollectionManagerFactory { @Override public MongoDBDocumentCollectionManager get(String database) { return new MongoDBDocumentCollectionManager(mongoClient.getDatabase(database)); } MongoDBDocumentCollectionManagerFactory(MongoClient mongoClient); @Override MongoDBDocumentCollectionManager get(String database); @Override void close(); @Override String toString();  }
@Test public void shouldCreateEntityManager() { MongoDBDocumentCollectionManagerFactory mongoDBFactory = configuration.get(); assertNotNull(mongoDBFactory.get("database")); }
@Test public void shouldReturnNPEWhenSettingsIsNull() { assertThrows(NullPointerException.class, () -> configuration.get((Settings) null)); }
@Test public void shouldReturnNPEWhenMapSettingsIsNull() { assertThrows(NullPointerException.class, () -> configuration.get((Map<String, String>) null)); }
@Test public void shouldReturnNPEWhenMongoClientIsNull() { assertThrows(NullPointerException.class, () -> configuration.get((MongoClient) null)); }