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 testAnotherListenerListToEndPointsWithNonDefaultProtoMap() {
        Map<ListenerName, SecurityProtocol> map = new HashMap<>();
        map.put(new ListenerName("CONTROLLER"), SecurityProtocol.PLAINTEXT);
        assertEquals(Arrays.asList(
            new Endpoint("CONTROLLER", SecurityProtocol.PLAINTEXT, "example.com", 9093)),
                SocketServerConfigs.listenerListToEndPoints("CONTROLLER://example.com:9093",
                    map));
    }