class GovernanceConfigurationYamlSwapper implements YamlSwapper<YamlGovernanceConfiguration, GovernanceConfiguration> {

    @Override
    public GovernanceConfiguration swapToObject(final YamlGovernanceConfiguration yamlConfig) {
        GovernanceCenterConfiguration registryCenter = governanceCenterConfigurationSwapper.swapToObject(yamlConfig.getRegistryCenter());
        if (null == yamlConfig.getAdditionalConfigCenter()) {
            return new GovernanceConfiguration(yamlConfig.getName(), registryCenter, yamlConfig.isOverwrite());
        }
        GovernanceCenterConfiguration additionalConfigCenter = governanceCenterConfigurationSwapper.swapToObject(yamlConfig.getAdditionalConfigCenter());
        return new GovernanceConfiguration(yamlConfig.getName(), registryCenter, additionalConfigCenter, yamlConfig.isOverwrite());
    }

}