@Override
    public MaskTableRuleConfiguration swapToObject(final YamlMaskTableRuleConfiguration yamlConfig) {
        Collection<MaskColumnRuleConfiguration> columns = new LinkedList<>();
        for (Entry<String, YamlMaskColumnRuleConfiguration> entry : yamlConfig.getColumns().entrySet()) {
            YamlMaskColumnRuleConfiguration yamlMaskColumnRuleConfig = entry.getValue();
            yamlMaskColumnRuleConfig.setLogicColumn(entry.getKey());
            columns.add(columnSwapper.swapToObject(yamlMaskColumnRuleConfig));
        }
        return new MaskTableRuleConfiguration(yamlConfig.getName(), columns);
    }
@Test
    void assertSwapToObject() {
        YamlMaskColumnRuleConfiguration encryptColumnRuleConfig = new YamlMaskColumnRuleConfiguration();
        encryptColumnRuleConfig.setLogicColumn("mask_column");
        encryptColumnRuleConfig.setMaskAlgorithm("md5_mask");
        Map<String, YamlMaskColumnRuleConfiguration> columns = new LinkedHashMap<>(1);
        columns.put("mask_column", encryptColumnRuleConfig);
        YamlMaskTableRuleConfiguration yamlMaskTableRuleConfig = new YamlMaskTableRuleConfiguration();
        yamlMaskTableRuleConfig.setName("test_table");
        yamlMaskTableRuleConfig.setColumns(columns);
        MaskTableRuleConfiguration actualMaskTableRuleConfig = swapper.swapToObject(yamlMaskTableRuleConfig);
        assertThat(actualMaskTableRuleConfig.getName(), is("test_table"));
        Collection<MaskColumnRuleConfiguration> actualColumns = actualMaskTableRuleConfig.getColumns();
        assertThat(actualColumns.size(), is(1));
        MaskColumnRuleConfiguration actualMaskColumnRuleConfig = actualColumns.iterator().next();
        assertThat(actualMaskColumnRuleConfig.getLogicColumn(), is("mask_column"));
        assertThat(actualMaskColumnRuleConfig.getMaskAlgorithm(), is("md5_mask"));
    }