@Override
    public YamlMaskTableRuleConfiguration swapToYamlConfiguration(final MaskTableRuleConfiguration data) {
        YamlMaskTableRuleConfiguration result = new YamlMaskTableRuleConfiguration();
        for (MaskColumnRuleConfiguration each : data.getColumns()) {
            result.getColumns().put(each.getLogicColumn(), columnSwapper.swapToYamlConfiguration(each));
        }
        result.setName(data.getName());
        return result;
    }
@Test
    void assertSwapToYamlConfiguration() {
        Collection<MaskColumnRuleConfiguration> encryptColumnRuleConfigs = Arrays.asList(
                new MaskColumnRuleConfiguration("mask_column_1", "md5_mask"),
                new MaskColumnRuleConfiguration("mask_column_2", "keep_from_x_to_y"),
                new MaskColumnRuleConfiguration("mask_column_3", "keep_first_m_last_m"));
        MaskTableRuleConfiguration encryptTableRuleConfig = new MaskTableRuleConfiguration("test_table", encryptColumnRuleConfigs);
        YamlMaskTableRuleConfiguration actualYamlMaskTableRuleConfig = swapper.swapToYamlConfiguration(encryptTableRuleConfig);
        assertThat(actualYamlMaskTableRuleConfig.getName(), is("test_table"));
        Map<String, YamlMaskColumnRuleConfiguration> actualColumns = actualYamlMaskTableRuleConfig.getColumns();
        assertThat(actualColumns.size(), is(3));
        YamlMaskColumnRuleConfiguration actualYamlMaskColumnRuleConfigFirst = actualColumns.get("mask_column_1");
        assertThat(actualYamlMaskColumnRuleConfigFirst.getMaskAlgorithm(), is("md5_mask"));
        YamlMaskColumnRuleConfiguration actualYamlMaskColumnRuleConfigSecond = actualColumns.get("mask_column_2");
        assertThat(actualYamlMaskColumnRuleConfigSecond.getMaskAlgorithm(), is("keep_from_x_to_y"));
        YamlMaskColumnRuleConfiguration actualYamlMaskColumnRuleConfigThird = actualColumns.get("mask_column_3");
        assertThat(actualYamlMaskColumnRuleConfigThird.getMaskAlgorithm(), is("keep_first_m_last_m"));
    }