DataSourceParameterConverter { public static Map<String, DataSourceConfiguration> getDataSourceConfigurationMap(final Map<String, DataSourceParameter> dataSourceParameterMap) { return dataSourceParameterMap.entrySet().stream() .collect(Collectors.toMap(Entry::getKey, entry -> createDataSourceConfiguration(entry.getValue()), (oldVal, currVal) -> oldVal, LinkedHashMap::new)); }  static Map<String, DataSourceParameter> getDataSourceParameterMap(final Map<String, DataSourceConfiguration> dataSourceConfigurationMap); static Map<String, DataSourceParameter> getDataSourceParameterMapFromYamlConfiguration(final Map<String, YamlDataSourceParameter> dataSourceParameters); static Map<String, DataSourceConfiguration> getDataSourceConfigurationMap(final Map<String, DataSourceParameter> dataSourceParameterMap);  }
@Test public void assertGetDataSourceConfigurationMap() { Map<String, DataSourceParameter> dataSourceParameterMap = new HashMap<>(2, 1); dataSourceParameterMap.put("ds_0", crateDataSourceParameter()); dataSourceParameterMap.put("ds_1", crateDataSourceParameter()); Map<String, DataSourceConfiguration> actual = DataSourceParameterConverter.getDataSourceConfigurationMap(dataSourceParameterMap); assertThat(actual.size(), is(2)); assertParameter(actual.get("ds_0")); assertParameter(actual.get("ds_1")); }