public static <T> Collector<T, ?, List<T>> toUnmodifiableList() {
        return Collectors.collectingAndThen(Collectors.toList(), Collections::unmodifiableList);
    }
Creates a collector that collects into an unmodifiable list.

<p>This is a polyfill equivalent of Java 10's
{@code Collectors#toUnmodifiableList}.

@param <T> Type of value to expect.
@return a Collector that accumulates the entries into an unmodifiable List.
smithy-utils/src/main/java/software/amazon/smithy/utils/ListUtils.java