RavenDBDocumentConfiguration implements DocumentConfiguration { @Override public RavenDBDocumentCollectionManagerFactory get() { Map<String, String> configuration = ConfigurationReader.from(FILE_CONFIGURATION); return get(configuration); }  @Override RavenDBDocumentCollectionManagerFactory get(); @Override RavenDBDocumentCollectionManagerFactory get(Settings settings);  }
@Test public void shouldCreateDocumentCollectionManagerFactoryByMap() { Map<String, Object> map = new HashMap<>(); map.put("ravendb-server-host-1", "172.17.0.2:8080"); RavenDBDocumentConfiguration configuration = new RavenDBDocumentConfiguration(); DocumentCollectionManagerFactory managerFactory = configuration.get(Settings.of(map)); assertNotNull(managerFactory); }
@Test public void shouldCreateDocumentCollectionManagerFactoryByFile() { DocumentConfiguration configuration = new RavenDBDocumentConfiguration(); DocumentCollectionManagerFactory managerFactory = configuration.get(); assertNotNull(managerFactory); }
@Test public void shouldReturnErrorWhendSettingsIsNull() { DocumentConfiguration configuration = new RavenDBDocumentConfiguration(); assertThrows(NullPointerException.class, () -> configuration.get(null)); }