ShadowRuleConfigurationYamlSwapper implements YamlRuleConfigurationSwapper<YamlShadowRuleConfiguration, ShadowRuleConfiguration> { @Override public YamlShadowRuleConfiguration swapToYamlConfiguration(final ShadowRuleConfiguration data) { YamlShadowRuleConfiguration result = new YamlShadowRuleConfiguration(); result.setColumn(data.getColumn()); result.setSourceDataSourceNames(data.getSourceDataSourceNames()); result.setShadowDataSourceNames(data.getShadowDataSourceNames()); return result; }  @Override YamlShadowRuleConfiguration swapToYamlConfiguration(final ShadowRuleConfiguration data); @Override ShadowRuleConfiguration swapToObject(final YamlShadowRuleConfiguration yamlConfig); @Override Class<ShadowRuleConfiguration> getTypeClass(); @Override String getRuleTagName(); @Override int getOrder();  }
@Test public void assertSwapToYamlConfiguration() { ShadowRuleConfiguration shadowRuleConfig = new ShadowRuleConfiguration("shadow", Arrays.asList("ds", "ds1"), Arrays.asList("shadow_ds", "shadow_ds1")); YamlShadowRuleConfiguration actual = new ShadowRuleConfigurationYamlSwapper().swapToYamlConfiguration(shadowRuleConfig); assertThat(actual.getColumn(), is("shadow")); assertThat(actual.getSourceDataSourceNames().size(), is(actual.getShadowDataSourceNames().size())); assertThat(actual.getSourceDataSourceNames(), is(Arrays.asList("ds", "ds1"))); assertThat(actual.getShadowDataSourceNames(), is(Arrays.asList("shadow_ds", "shadow_ds1"))); }