RavenDBDocumentCollectionManagerFactory implements DocumentCollectionManagerFactory { @Override public RavenDBDocumentCollectionManager get(String database) { Objects.requireNonNull(database, "database is required"); DocumentStore documentStore = new DocumentStore(hosts, database); return new RavenDBDocumentCollectionManager(documentStore); } RavenDBDocumentCollectionManagerFactory(String[] hosts); @Override RavenDBDocumentCollectionManager get(String database); @Override void close(); @Override String toString();  }
@Test public void shouldCreateEntityManager() { RavenDBDocumentCollectionManagerFactory ravenDBFactory = configuration.get(); assertNotNull(ravenDBFactory.get("database")); }
@Test public void shouldReturnNPEWhenSettingsIsNull() { assertThrows(NullPointerException.class, () -> configuration.get(null)); }