class DataSourceConfigurationYamlSwapper implements YamlSwapper<YamlDataSourceConfiguration, DataSourceConfiguration> {

    @Override
    public DataSourceConfiguration swapToObject(final YamlDataSourceConfiguration yamlConfig) {
        DataSourceConfiguration result = new DataSourceConfiguration(yamlConfig.getDataSourceClassName());
        result.getProps().putAll(yamlConfig.getProps());
        return result;
    }

}