private static void listener(XmlGenerator gen, List<ListenerConfig> listeners) {
        if (listeners.isEmpty()) {
            return;
        }
        gen.open("listeners");
        for (ListenerConfig listener : listeners) {
            gen.node("listener", classNameOrImplClass(listener.getClassName(), listener.getImplementation()));
        }
        gen.close();
    }
@Test
    public void listener() {
        ListenerConfig expected = new ListenerConfig(randomString());
        clientConfig.addListenerConfig(expected);
        ClientConfig actual = newConfigViaGenerator();
        assertCollection(clientConfig.getListenerConfigs(), actual.getListenerConfigs());
    }