@Override
    public String toString() {
        StringBuilder bld = new StringBuilder();
        bld.append("ListenerInfo(");
        String prefix = "";
        for (Endpoint endpoint : listeners.values()) {
            bld.append(prefix).append(endpoint);
            prefix = ", ";
        }
        bld.append(")");
        return bld.toString();
    }
@Test
    public void testToString() {
        ListenerInfo listenerInfo = ListenerInfo.create(Arrays.asList(EXTERNAL, SASL_PLAINTEXT));
        assertEquals("ListenerInfo(Endpoint(listenerName='EXTERNAL', securityProtocol=SASL_SSL, host='example.com', port=9092), " +
            "Endpoint(listenerName='SASL_PLAINTEXT', securityProtocol=SASL_PLAINTEXT, host='example2.com', port=9094))",
            listenerInfo.toString());
    }