@Override
    public EncryptTableRuleConfiguration swapToObject(final YamlEncryptTableRuleConfiguration yamlConfig) {
        Collection<EncryptColumnRuleConfiguration> columns = new LinkedList<>();
        for (Entry<String, YamlEncryptColumnRuleConfiguration> entry : yamlConfig.getColumns().entrySet()) {
            entry.getValue().setName(entry.getKey());
            columns.add(columnSwapper.swapToObject(entry.getValue()));
        }
        return new EncryptTableRuleConfiguration(yamlConfig.getName(), columns);
    }
@Test
    void assertSwapToObject() {
        Map<String, YamlEncryptColumnRuleConfiguration> columns = Collections.singletonMap("test_column", buildYamlEncryptColumnRuleConfiguration());
        YamlEncryptTableRuleConfiguration yamlEncryptTableRuleConfig = new YamlEncryptTableRuleConfiguration();
        yamlEncryptTableRuleConfig.setName("test_table");
        yamlEncryptTableRuleConfig.setColumns(columns);
        EncryptTableRuleConfiguration actualEncryptTableRuleConfig = swapper.swapToObject(yamlEncryptTableRuleConfig);
        assertThat(actualEncryptTableRuleConfig.getName(), is("test_table"));
        Collection<EncryptColumnRuleConfiguration> actualColumns = actualEncryptTableRuleConfig.getColumns();
        assertThat(actualColumns.size(), is(1));
        EncryptColumnRuleConfiguration actualEncryptColumnRuleConfig = actualColumns.iterator().next();
        assertThat(actualEncryptColumnRuleConfig.getName(), is("test_column"));
        assertThat(actualEncryptColumnRuleConfig.getCipher().getName(), is("encrypt_cipher"));
        assertThat(actualEncryptColumnRuleConfig.getCipher().getEncryptorName(), is("test_encryptor"));
        assertTrue(actualEncryptColumnRuleConfig.getAssistedQuery().isPresent());
        assertThat(actualEncryptColumnRuleConfig.getAssistedQuery().get().getName(), is("encrypt_assisted"));
        assertTrue(actualEncryptColumnRuleConfig.getLikeQuery().isPresent());
        assertThat(actualEncryptColumnRuleConfig.getLikeQuery().get().getName(), is("encrypt_like"));
    }