### Question:
DatabaseConnectionConfigBuilder { public List<DatabaseConnectionConfig> build() { Validate.notEmpty(this.properties, "properties must not be empty"); Validate.notBlank(this.properties.get(DEFAULT_CONNECTION_STRING_PROPERTY), "Default connection string must be present"); List<DatabaseConnectionConfig> databaseConnectionConfigs = new ArrayList<>(); int numberOfCatalogs = 0; for (Map.Entry<String, String> property : this.properties.entrySet()) { final String key = property.getKey(); final String value = property.getValue(); String catalogName; if (DEFAULT_CONNECTION_STRING_PROPERTY.equals(key.toLowerCase())) { catalogName = key.toLowerCase(); } else if (key.endsWith(CONNECTION_STRING_PROPERTY_SUFFIX)) { catalogName = key.replace(CONNECTION_STRING_PROPERTY_SUFFIX, ""); } else { continue; } databaseConnectionConfigs.add(extractDatabaseConnectionConfig(catalogName, value)); numberOfCatalogs++; if (numberOfCatalogs > MUX_CATALOG_LIMIT) { throw new RuntimeException("Too many database instances in mux. Max supported is " + MUX_CATALOG_LIMIT); } } return databaseConnectionConfigs; }  static List<DatabaseConnectionConfig> buildFromSystemEnv(); DatabaseConnectionConfigBuilder properties(final Map<String, String> properties); List<DatabaseConnectionConfig> build(); static final String DEFAULT_CONNECTION_STRING_PROPERTY; static final Pattern SECRET_PATTERN; }### Answer:
@Test public void build() { DatabaseConnectionConfig expectedDatabase1 = new DatabaseConnectionConfig("testCatalog1", JdbcConnectionFactory.DatabaseEngine.MYSQL, "jdbc:mysql: DatabaseConnectionConfig expectedDatabase2 = new DatabaseConnectionConfig("testCatalog2", JdbcConnectionFactory.DatabaseEngine.POSTGRES, "jdbc:postgresql: DatabaseConnectionConfig defaultConnection = new DatabaseConnectionConfig("default", JdbcConnectionFactory.DatabaseEngine.POSTGRES, "jdbc:postgresql: List<DatabaseConnectionConfig> databaseConnectionConfigs = new DatabaseConnectionConfigBuilder() .properties(ImmutableMap.of( "default", CONNECTION_STRING2, "testCatalog1_connection_string", CONNECTION_STRING1, "testCatalog2_connection_string", CONNECTION_STRING2)) .build(); Assert.assertEquals(Arrays.asList(defaultConnection, expectedDatabase1, expectedDatabase2), databaseConnectionConfigs); }