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 assertSwapToYamlGovernanceConfigurationWithoutAdditionalConfigCenterConfiguration() {
          GovernanceConfiguration expected = createGovernanceConfigurationWithoutAdditionalConfigCenterConfiguration();
          YamlGovernanceConfiguration actual = new GovernanceConfigurationYamlSwapper().swapToYamlConfiguration(expected);
          assertThat(actual.getName(), is(expected.getName()));
          assertThat(actual.isOverwrite(), is(expected.isOverwrite()));
          assertThat(actual.getRegistryCenter().getType(), is(expected.getRegistryCenterConfiguration().getType()));
          assertThat(actual.getRegistryCenter().getServerLists(), is(expected.getRegistryCenterConfiguration().getServerLists()));
          assertThat(actual.getRegistryCenter().getProps(), is(expected.getRegistryCenterConfiguration().getProps()));
          assertFalse(expected.getAdditionalConfigCenterConfiguration().isPresent());
      }
test_case.class_method_signature: GovernanceConfigurationYamlSwapperTest.assertSwapToYamlGovernanceConfigurationWithoutAdditionalConfigCenterConfiguration()
test_case.full_signature: @Test public void assertSwapToYamlGovernanceConfigurationWithoutAdditionalConfigCenterConfiguration()
test_case.identifier: assertSwapToYamlGovernanceConfigurationWithoutAdditionalConfigCenterConfiguration
test_case.invocations: createGovernanceConfigurationWithoutAdditionalConfigCenterConfiguration swapToYamlConfiguration assertThat getName is getName assertThat isOverwrite is isOverwrite assertThat getType getRegistryCenter is getType getRegistryCenterConfiguration assertThat getServerLists getRegistryCenter is getServerLists getRegistryCenterConfiguration assertThat getProps getRegistryCenter is getProps getRegistryCenterConfiguration assertFalse isPresent getAdditionalConfigCenterConfiguration
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertSwapToYamlGovernanceConfigurationWithoutAdditionalConfigCenterConfiguration()
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 YamlGovernanceConfiguration swapToYamlConfiguration(final GovernanceConfiguration data) {
          YamlGovernanceConfiguration result = new YamlGovernanceConfiguration();
          result.setName(data.getName());
          result.setRegistryCenter(governanceCenterConfigurationSwapper.swapToYamlConfiguration(data.getRegistryCenterConfiguration()));
          if (data.getAdditionalConfigCenterConfiguration().isPresent()) {
              result.setAdditionalConfigCenter(governanceCenterConfigurationSwapper.swapToYamlConfiguration(data.getAdditionalConfigCenterConfiguration().get()));
          }
          return result;
      }
focal_method.class_method_signature: GovernanceConfigurationYamlSwapper.swapToYamlConfiguration(final GovernanceConfiguration data)
focal_method.full_signature: @Override public YamlGovernanceConfiguration swapToYamlConfiguration(final GovernanceConfiguration data)
focal_method.identifier: swapToYamlConfiguration
focal_method.invocations: setName getName setRegistryCenter swapToYamlConfiguration getRegistryCenterConfiguration isPresent getAdditionalConfigCenterConfiguration setAdditionalConfigCenter swapToYamlConfiguration get getAdditionalConfigCenterConfiguration
focal_method.modifiers: @Override public
focal_method.parameters: (final GovernanceConfiguration data)
focal_method.return: YamlGovernanceConfiguration
focal_method.signature: YamlGovernanceConfiguration swapToYamlConfiguration(final GovernanceConfiguration data)