test_class.declarator: swapper = new ConsensusReplicationRuleConfigurationYamlSwapper()
test_class.modifier: private final
test_class.original_string: private final ConsensusReplicationRuleConfigurationYamlSwapper swapper = new ConsensusReplicationRuleConfigurationYamlSwapper();
test_class.type: ConsensusReplicationRuleConfigurationYamlSwapper
test_class.var_name: swapper
test_class.declarator: logicTableName = "t_order"
test_class.modifier: private final
test_class.original_string: private final String logicTableName = "t_order";
test_class.type: String
test_class.var_name: logicTableName
test_class.declarator: dataSourceName = "demo_ds_0"
test_class.modifier: private final
test_class.original_string: private final String dataSourceName = "demo_ds_0";
test_class.type: String
test_class.var_name: dataSourceName
test_class.declarator: physicsTable = "t_order_1"
test_class.modifier: private final
test_class.original_string: private final String physicsTable = "t_order_1";
test_class.type: String
test_class.var_name: physicsTable
test_class.declarator: replicaGroupId = "raftGroupTest1"
test_class.modifier: private final
test_class.original_string: private final String replicaGroupId = "raftGroupTest1";
test_class.type: String
test_class.var_name: replicaGroupId
test_class.declarator: replicaPeers = "127.0.0.1:9090"
test_class.modifier: private final
test_class.original_string: private final String replicaPeers = "127.0.0.1:9090";
test_class.type: String
test_class.var_name: replicaPeers
test_class.file: shardingsphere-features/shardingsphere-consensus-replication/shardingsphere-consensus-replication-common/src/test/java/org/apache/shardingsphere/replication/consensus/yaml/swapper/ConsensusReplicationRuleConfigurationYamlSwapperTest.java
test_class.identifier: ConsensusReplicationRuleConfigurationYamlSwapperTest
test_case.body: @Test
      public void assertSwapToObjectWithMinProperties() {
          YamlConsensusReplicationLogicTableRuleConfiguration yamlLogicTable = new YamlConsensusReplicationLogicTableRuleConfiguration();
          yamlLogicTable.setLogicTable(logicTableName);
          YamlConsensusReplicationRuleConfiguration yamlConfig = new YamlConsensusReplicationRuleConfiguration();
          yamlConfig.setTables(Collections.singleton(yamlLogicTable));
          ConsensusReplicationRuleConfiguration config = swapper.swapToObject(yamlConfig);
          assertNotNull(config);
          assertNotNull(config.getTables());
          assertThat(config.getTables().size(), is(1));
          Collection<ConsensusReplicationActualTableRuleConfiguration> resultReplicaGroups = config.getTables().iterator().next().getReplicaGroups();
          assertNotNull(resultReplicaGroups);
          assertTrue(resultReplicaGroups.isEmpty());
      }
test_case.class_method_signature: ConsensusReplicationRuleConfigurationYamlSwapperTest.assertSwapToObjectWithMinProperties()
test_case.full_signature: @Test public void assertSwapToObjectWithMinProperties()
test_case.identifier: assertSwapToObjectWithMinProperties
test_case.invocations: setLogicTable setTables singleton swapToObject assertNotNull assertNotNull getTables assertThat size getTables is getReplicaGroups next iterator getTables assertNotNull assertTrue isEmpty
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertSwapToObjectWithMinProperties()
focal_class.declarator: logicTableRuleConfigurationYamlSwapper = new ConsensusReplicationLogicTableRuleConfigurationYamlSwapper()
focal_class.modifier: private final
focal_class.original_string: private final ConsensusReplicationLogicTableRuleConfigurationYamlSwapper logicTableRuleConfigurationYamlSwapper = new ConsensusReplicationLogicTableRuleConfigurationYamlSwapper();
focal_class.type: ConsensusReplicationLogicTableRuleConfigurationYamlSwapper
focal_class.var_name: logicTableRuleConfigurationYamlSwapper
focal_class.file: shardingsphere-features/shardingsphere-consensus-replication/shardingsphere-consensus-replication-common/src/main/java/org/apache/shardingsphere/replication/consensus/yaml/swapper/ConsensusReplicationRuleConfigurationYamlSwapper.java
focal_class.identifier: ConsensusReplicationRuleConfigurationYamlSwapper
focal_class.interfaces: implements YamlRuleConfigurationSwapper<YamlConsensusReplicationRuleConfiguration, ConsensusReplicationRuleConfiguration>
focal_class.class_method_signature: ConsensusReplicationRuleConfigurationYamlSwapper.swapToYamlConfiguration(final ConsensusReplicationRuleConfiguration data)
focal_class.full_signature: @Override public YamlConsensusReplicationRuleConfiguration swapToYamlConfiguration(final ConsensusReplicationRuleConfiguration data)
focal_class.identifier: swapToYamlConfiguration
focal_class.modifiers: @Override public
focal_class.parameters: (final ConsensusReplicationRuleConfiguration data)
focal_class.return: YamlConsensusReplicationRuleConfiguration
focal_class.signature: YamlConsensusReplicationRuleConfiguration swapToYamlConfiguration(final ConsensusReplicationRuleConfiguration data)
focal_class.class_method_signature: ConsensusReplicationRuleConfigurationYamlSwapper.swapToObject(final YamlConsensusReplicationRuleConfiguration yamlConfig)
focal_class.full_signature: @Override public ConsensusReplicationRuleConfiguration swapToObject(final YamlConsensusReplicationRuleConfiguration yamlConfig)
focal_class.identifier: swapToObject
focal_class.modifiers: @Override public
focal_class.parameters: (final YamlConsensusReplicationRuleConfiguration yamlConfig)
focal_class.return: ConsensusReplicationRuleConfiguration
focal_class.signature: ConsensusReplicationRuleConfiguration swapToObject(final YamlConsensusReplicationRuleConfiguration yamlConfig)
focal_class.class_method_signature: ConsensusReplicationRuleConfigurationYamlSwapper.getTypeClass()
focal_class.full_signature: @Override public Class<ConsensusReplicationRuleConfiguration> getTypeClass()
focal_class.identifier: getTypeClass
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class<ConsensusReplicationRuleConfiguration>
focal_class.signature: Class<ConsensusReplicationRuleConfiguration> getTypeClass()
focal_class.class_method_signature: ConsensusReplicationRuleConfigurationYamlSwapper.getRuleTagName()
focal_class.full_signature: @Override public String getRuleTagName()
focal_class.identifier: getRuleTagName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getRuleTagName()
focal_class.class_method_signature: ConsensusReplicationRuleConfigurationYamlSwapper.getOrder()
focal_class.full_signature: @Override public int getOrder()
focal_class.identifier: getOrder
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getOrder()
focal_method.body: @Override
      public ConsensusReplicationRuleConfiguration swapToObject(final YamlConsensusReplicationRuleConfiguration yamlConfig) {
          Collection<ConsensusReplicationLogicTableRuleConfiguration> tables = yamlConfig.getTables().stream()
                  .map(logicTableRuleConfigurationYamlSwapper::swapToObject)
                  .collect(Collectors.toList());
          return new ConsensusReplicationRuleConfiguration(tables);
      }
focal_method.class_method_signature: ConsensusReplicationRuleConfigurationYamlSwapper.swapToObject(final YamlConsensusReplicationRuleConfiguration yamlConfig)
focal_method.full_signature: @Override public ConsensusReplicationRuleConfiguration swapToObject(final YamlConsensusReplicationRuleConfiguration yamlConfig)
focal_method.identifier: swapToObject
focal_method.invocations: collect map stream getTables toList
focal_method.modifiers: @Override public
focal_method.parameters: (final YamlConsensusReplicationRuleConfiguration yamlConfig)
focal_method.return: ConsensusReplicationRuleConfiguration
focal_method.signature: ConsensusReplicationRuleConfiguration swapToObject(final YamlConsensusReplicationRuleConfiguration yamlConfig)