test_class.file: shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapperTest.java
test_class.identifier: GovernanceConfigurationYamlSwapperTest
test_case.body: @Test
      public void assertSwapToGovernanceConfigurationWithAdditionalConfigCenterConfiguration() {
          YamlGovernanceConfiguration expected = createYamlGovernanceConfigurationWithAdditionalConfigCenterConfiguration();
          GovernanceConfiguration actual = new GovernanceConfigurationYamlSwapper().swapToObject(expected);
          assertThat(actual.getName(), is(expected.getName()));
          assertThat(actual.isOverwrite(), is(expected.isOverwrite()));
          assertThat(actual.getRegistryCenterConfiguration().getType(), is(expected.getRegistryCenter().getType()));
          assertThat(actual.getRegistryCenterConfiguration().getServerLists(), is(expected.getRegistryCenter().getServerLists()));
          assertThat(actual.getRegistryCenterConfiguration().getProps(), is(expected.getRegistryCenter().getProps()));
          assertTrue(actual.getAdditionalConfigCenterConfiguration().isPresent());
          assertThat(actual.getAdditionalConfigCenterConfiguration().get().getType(), is(expected.getAdditionalConfigCenter().getType()));
          assertThat(actual.getAdditionalConfigCenterConfiguration().get().getServerLists(), is(expected.getAdditionalConfigCenter().getServerLists()));
          assertThat(actual.getAdditionalConfigCenterConfiguration().get().getProps(), is(expected.getAdditionalConfigCenter().getProps()));
      }
test_case.class_method_signature: GovernanceConfigurationYamlSwapperTest.assertSwapToGovernanceConfigurationWithAdditionalConfigCenterConfiguration()
test_case.full_signature: @Test public void assertSwapToGovernanceConfigurationWithAdditionalConfigCenterConfiguration()
test_case.identifier: assertSwapToGovernanceConfigurationWithAdditionalConfigCenterConfiguration
test_case.invocations: createYamlGovernanceConfigurationWithAdditionalConfigCenterConfiguration swapToObject assertThat getName is getName assertThat isOverwrite is isOverwrite assertThat getType getRegistryCenterConfiguration is getType getRegistryCenter assertThat getServerLists getRegistryCenterConfiguration is getServerLists getRegistryCenter assertThat getProps getRegistryCenterConfiguration is getProps getRegistryCenter assertTrue isPresent getAdditionalConfigCenterConfiguration assertThat getType get getAdditionalConfigCenterConfiguration is getType getAdditionalConfigCenter assertThat getServerLists get getAdditionalConfigCenterConfiguration is getServerLists getAdditionalConfigCenter assertThat getProps get getAdditionalConfigCenterConfiguration is getProps getAdditionalConfigCenter
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertSwapToGovernanceConfigurationWithAdditionalConfigCenterConfiguration()
focal_class.declarator: governanceCenterConfigurationSwapper = new GovernanceCenterConfigurationYamlSwapper()
focal_class.modifier: private final
focal_class.original_string: private final GovernanceCenterConfigurationYamlSwapper governanceCenterConfigurationSwapper = new GovernanceCenterConfigurationYamlSwapper();
focal_class.type: GovernanceCenterConfigurationYamlSwapper
focal_class.var_name: governanceCenterConfigurationSwapper
focal_class.file: shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/GovernanceConfigurationYamlSwapper.java
focal_class.identifier: GovernanceConfigurationYamlSwapper
focal_class.interfaces: implements YamlSwapper<YamlGovernanceConfiguration, GovernanceConfiguration>
focal_class.class_method_signature: GovernanceConfigurationYamlSwapper.swapToYamlConfiguration(final GovernanceConfiguration data)
focal_class.full_signature: @Override public YamlGovernanceConfiguration swapToYamlConfiguration(final GovernanceConfiguration data)
focal_class.identifier: swapToYamlConfiguration
focal_class.modifiers: @Override public
focal_class.parameters: (final GovernanceConfiguration data)
focal_class.return: YamlGovernanceConfiguration
focal_class.signature: YamlGovernanceConfiguration swapToYamlConfiguration(final GovernanceConfiguration data)
focal_class.class_method_signature: GovernanceConfigurationYamlSwapper.swapToObject(final YamlGovernanceConfiguration yamlConfig)
focal_class.full_signature: @Override public GovernanceConfiguration swapToObject(final YamlGovernanceConfiguration yamlConfig)
focal_class.identifier: swapToObject
focal_class.modifiers: @Override public
focal_class.parameters: (final YamlGovernanceConfiguration yamlConfig)
focal_class.return: GovernanceConfiguration
focal_class.signature: GovernanceConfiguration swapToObject(final YamlGovernanceConfiguration yamlConfig)
focal_method.body: @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());
      }
focal_method.class_method_signature: GovernanceConfigurationYamlSwapper.swapToObject(final YamlGovernanceConfiguration yamlConfig)
focal_method.full_signature: @Override public GovernanceConfiguration swapToObject(final YamlGovernanceConfiguration yamlConfig)
focal_method.identifier: swapToObject
focal_method.invocations: swapToObject getRegistryCenter getAdditionalConfigCenter getName isOverwrite swapToObject getAdditionalConfigCenter getName isOverwrite
focal_method.modifiers: @Override public
focal_method.parameters: (final YamlGovernanceConfiguration yamlConfig)
focal_method.return: GovernanceConfiguration
focal_method.signature: GovernanceConfiguration swapToObject(final YamlGovernanceConfiguration yamlConfig)