MongoEventSourceSettings { public static MongoEventSourceSettings fromConfig(final Config config, final String persistenceIdPrefix, final boolean supportsNamespaces, final String journalPluginId, final String snapshotPluginId) { checkNotNull(config, "config"); checkNotNull(journalPluginId, "journal plugin ID"); checkNotNull(snapshotPluginId, "snapshot plugin ID"); final String metadataCollectionName = getCollectionName(config, journalPluginId, "metadata"); final String journalCollectionName = getCollectionName(config, journalPluginId, "journal"); final String snapshotCollectionName = getCollectionName(config, snapshotPluginId, "snaps"); return new MongoEventSourceSettings(persistenceIdPrefix, supportsNamespaces, metadataCollectionName, journalCollectionName, snapshotCollectionName); } private  MongoEventSourceSettings(final String persistenceIdPrefix,
            final boolean supportsNamespaces,
            final String metadataCollectionName,
            final String journalCollectionName,
            final String snapshotCollectionName); static MongoEventSourceSettings of(final String persistenceIdPrefix,
            final boolean supportsNamespaces,
            final String metadataCollectionName,
            final String journalCollectionName,
            final String snapshotCollectionName); static MongoEventSourceSettings fromConfig(final Config config,
            final String persistenceIdPrefix,
            final boolean supportsNamespaces,
            final String journalPluginId,
            final String snapshotPluginId); String getPersistenceIdPrefix(); String getMetadataCollectionName(); String getJournalCollectionName(); String getSnapshotCollectionName(); boolean isSupportsNamespaces(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test public void fromConfigFailsWithEmptyConfig() { assertThatExceptionOfType(ConfigException.Missing.class).isThrownBy(() -> MongoEventSourceSettings.fromConfig(ConfigFactory.empty(), PERSISTENCE_ID_PREFIX, SUPPORTS_NAMESPACES, JOURNAL_PLUGIN_ID, SNAPSHOT_PLUGIN_ID)); }