public static List<Endpoint> listenerListToEndPoints(
        String input,
        Map<ListenerName, SecurityProtocol> nameToSecurityProto
    ) {
        return listenerListToEndPoints(input, n -> {
            SecurityProtocol result = nameToSecurityProto.get(n);
            if (result == null) {
                throw new IllegalArgumentException("No security protocol defined for listener " + n.value());
            }
            return result;
        });
    }
@Test
    public void testListenerListToEndPointsWithUnderscores() {
        assertEquals(Arrays.asList(
            new Endpoint("PLAINTEXT", SecurityProtocol.PLAINTEXT, "example.com", 8080),
            new Endpoint("SSL", SecurityProtocol.SSL, "local_host", 8081)),
                SocketServerConfigs.listenerListToEndPoints("PLAINTEXT://example.com:8080,SSL://local_host:8081",
                    SocketServerConfigs.DEFAULT_NAME_TO_SECURITY_PROTO));
    }