@Override
    public YamlEncryptTableRuleConfiguration swapToYamlConfiguration(final EncryptTableRuleConfiguration data) {
        YamlEncryptTableRuleConfiguration result = new YamlEncryptTableRuleConfiguration();
        for (EncryptColumnRuleConfiguration each : data.getColumns()) {
            result.getColumns().put(each.getName(), columnSwapper.swapToYamlConfiguration(each));
        }
        result.setName(data.getName());
        return result;
    }
@Test
    void assertSwapToYamlConfiguration() {
        EncryptColumnRuleConfiguration encryptColumnTwoConfig = new EncryptColumnRuleConfiguration("encrypt_column_2", new EncryptColumnItemRuleConfiguration("encrypt_cipher_2", "test_encryptor_2"));
        EncryptColumnRuleConfiguration encryptColumnThreeConfig =
                new EncryptColumnRuleConfiguration("encrypt_column_3", new EncryptColumnItemRuleConfiguration("encrypt_cipher_3", "test_encryptor_3"));
        Collection<EncryptColumnRuleConfiguration> encryptColumnRuleConfigs = Arrays.asList(
                new EncryptColumnRuleConfiguration("encrypt_column_1", new EncryptColumnItemRuleConfiguration("encrypt_cipher_1", "test_encryptor_1")),
                encryptColumnTwoConfig,
                encryptColumnThreeConfig);
        EncryptTableRuleConfiguration encryptTableRuleConfig = new EncryptTableRuleConfiguration("test_table", encryptColumnRuleConfigs);
        YamlEncryptTableRuleConfiguration actualYamlEncryptTableRuleConfig = swapper.swapToYamlConfiguration(encryptTableRuleConfig);
        assertThat(actualYamlEncryptTableRuleConfig.getName(), is("test_table"));
        Map<String, YamlEncryptColumnRuleConfiguration> actualColumns = actualYamlEncryptTableRuleConfig.getColumns();
        assertThat(actualColumns.size(), is(3));
        YamlEncryptColumnRuleConfiguration actualYamlEncryptColumnRuleConfigFirst = actualColumns.get("encrypt_column_1");
        assertThat(actualYamlEncryptColumnRuleConfigFirst.getCipher().getName(), is("encrypt_cipher_1"));
        assertThat(actualYamlEncryptColumnRuleConfigFirst.getCipher().getEncryptorName(), is("test_encryptor_1"));
        YamlEncryptColumnRuleConfiguration actualYamlEncryptColumnRuleConfigSecond = actualColumns.get("encrypt_column_2");
        assertThat(actualYamlEncryptColumnRuleConfigSecond.getCipher().getName(), is("encrypt_cipher_2"));
        assertThat(actualYamlEncryptColumnRuleConfigSecond.getCipher().getEncryptorName(), is("test_encryptor_2"));
        YamlEncryptColumnRuleConfiguration actualYamlEncryptColumnRuleConfigThird = actualColumns.get("encrypt_column_3");
        assertThat(actualYamlEncryptColumnRuleConfigThird.getCipher().getName(), is("encrypt_cipher_3"));
        assertThat(actualYamlEncryptColumnRuleConfigThird.getCipher().getEncryptorName(), is("test_encryptor_3"));
    }