ConsensusReplicationActualTableRuleConfigurationYamlSwapper implements YamlSwapper<YamlConsensusReplicationActualTableRuleConfiguration, ConsensusReplicationActualTableRuleConfiguration> { @Override public ConsensusReplicationActualTableRuleConfiguration swapToObject(final YamlConsensusReplicationActualTableRuleConfiguration yamlConfig) { return new ConsensusReplicationActualTableRuleConfiguration(yamlConfig.getPhysicsTable(), yamlConfig.getReplicaGroupId(), yamlConfig.getReplicaPeers(), yamlConfig.getDataSourceName()); }  @Override YamlConsensusReplicationActualTableRuleConfiguration swapToYamlConfiguration(final ConsensusReplicationActualTableRuleConfiguration data); @Override ConsensusReplicationActualTableRuleConfiguration swapToObject(final YamlConsensusReplicationActualTableRuleConfiguration yamlConfig);  }
@Test public void assertSwapToObjectWithMaxProperties() { YamlConsensusReplicationActualTableRuleConfiguration yamlConfig = new YamlConsensusReplicationActualTableRuleConfiguration(); yamlConfig.setPhysicsTable(physicsTable); yamlConfig.setReplicaGroupId(replicaGroupId); yamlConfig.setReplicaPeers(replicaPeers); yamlConfig.setDataSourceName(dataSourceName); ConsensusReplicationActualTableRuleConfiguration config = swapper.swapToObject(yamlConfig); assertThat(config.getDataSourceName(), is(dataSourceName)); assertThat(config.getPhysicsTable(), is(physicsTable)); assertThat(config.getReplicaGroupId(), is(replicaGroupId)); assertThat(config.getReplicaPeers(), is(replicaPeers)); }