@Override
    public SQLParserRuleConfiguration swapToObject(final YamlSQLParserRuleConfiguration yamlConfig) {
        CacheOption parseTreeCacheOption = null == yamlConfig.getParseTreeCache()
                ? DefaultSQLParserRuleConfigurationBuilder.PARSE_TREE_CACHE_OPTION
                : cacheOptionSwapper.swapToObject(yamlConfig.getParseTreeCache());
        CacheOption sqlStatementCacheOption = null == yamlConfig.getSqlStatementCache()
                ? DefaultSQLParserRuleConfigurationBuilder.SQL_STATEMENT_CACHE_OPTION
                : cacheOptionSwapper.swapToObject(yamlConfig.getSqlStatementCache());
        return new SQLParserRuleConfiguration(parseTreeCacheOption, sqlStatementCacheOption);
    }
@Test
    void assertSwapToObject() {
        YamlSQLParserRuleConfiguration yamlConfig = new YamlSQLParserRuleConfiguration();
        yamlConfig.setParseTreeCache(new YamlSQLParserCacheOptionRuleConfiguration());
        yamlConfig.getParseTreeCache().setInitialCapacity(2);
        yamlConfig.getParseTreeCache().setMaximumSize(5L);
        yamlConfig.setSqlStatementCache(new YamlSQLParserCacheOptionRuleConfiguration());
        yamlConfig.getSqlStatementCache().setInitialCapacity(4);
        yamlConfig.getSqlStatementCache().setMaximumSize(7L);
        SQLParserRuleConfiguration actual = new YamlSQLParserRuleConfigurationSwapper().swapToObject(yamlConfig);
        assertThat(actual.getParseTreeCache().getInitialCapacity(), is(2));
        assertThat(actual.getParseTreeCache().getMaximumSize(), is(5L));
        assertThat(actual.getSqlStatementCache().getInitialCapacity(), is(4));
        assertThat(actual.getSqlStatementCache().getMaximumSize(), is(7L));
    }