public static <K, V> Map.Entry<K, V> entry(K key, V value) {
        return Pair.of(Objects.requireNonNull(key), Objects.requireNonNull(value));
    }
Creates an immutable {@link Map.Entry} from the given key and value.

@param key Key to set in the {@code Map.Entry}.
@param value Value to set in the {@code Map.Entry}.
@param <K> Key type.
@param <V> Value type.
@return Returns the created entry.
@throws NullPointerException if the key or value are null.
smithy-utils/src/main/java/software/amazon/smithy/utils/MapUtils.java