private static void proxyFactory(XmlGenerator gen, List<ProxyFactoryConfig> proxyFactories) {
        if (proxyFactories.isEmpty()) {
            return;
        }
        gen.open("proxy-factories");
        for (ProxyFactoryConfig proxyFactory : proxyFactories) {
            gen.node("proxy-factory", null,
                    "class-name", classNameOrImplClass(proxyFactory.getClassName(), proxyFactory.getFactoryImpl()),
                    "service", proxyFactory.getService());
        }
        gen.close();
    }
@Test
    public void proxyFactory() {
        ProxyFactoryConfig expected = new ProxyFactoryConfig();
        expected.setClassName(randomString())
                .setService(randomString());
        clientConfig.addProxyFactoryConfig(expected);

        List<ProxyFactoryConfig> actual = newConfigViaGenerator().getProxyFactoryConfigs();
        assertCollection(clientConfig.getProxyFactoryConfigs(), actual);
    }