private static void sqlConfig(XmlGenerator gen, Config config) {
        SqlConfig sqlConfig = config.getSqlConfig();
        JavaSerializationFilterConfig filterConfig = sqlConfig.getJavaReflectionFilterConfig();
        gen.open("sql")
                .node("statement-timeout-millis", sqlConfig.getStatementTimeoutMillis())
                .node("catalog-persistence-enabled", sqlConfig.isCatalogPersistenceEnabled());
        if (filterConfig != null) {
            gen.open("java-reflection-filter", "defaults-disabled", filterConfig.isDefaultsDisabled());
            appendFilterList(gen, "blacklist", filterConfig.getBlacklist());
            appendFilterList(gen, "whitelist", filterConfig.getWhitelist());
            gen.close();
        }
        gen.close();
    }
@Test
    public void testSqlConfig() {
        Config config = new Config();

        config.getSqlConfig().setStatementTimeoutMillis(30L);
        config.getSqlConfig().setCatalogPersistenceEnabled(true);
        JavaSerializationFilterConfig filterConfig = new JavaSerializationFilterConfig();
        filterConfig.getWhitelist().addClasses("com.foo.bar.MyClass");
        filterConfig.getBlacklist().addPackages("magic.collection.of.code");
        config.getSqlConfig().setJavaReflectionFilterConfig(filterConfig);

        SqlConfig generatedConfig = getNewConfigViaXMLGenerator(config).getSqlConfig();

        assertEquals(config.getSqlConfig().getStatementTimeoutMillis(), generatedConfig.getStatementTimeoutMillis());
        assertEquals(config.getSqlConfig().isCatalogPersistenceEnabled(), generatedConfig.isCatalogPersistenceEnabled());
        assertEquals(config.getSqlConfig().getJavaReflectionFilterConfig(), generatedConfig.getJavaReflectionFilterConfig());
    }