public static <K, V> Map<K, V> requireKeys(Map<K, V> map, K requiredKey) {
        requireNonNull(map);
        requireNonNull(requiredKey);

        if (!map.containsKey(requiredKey)) {
            throw new NoSuchElementException("The Map does not contain the key " + requiredKey);
        }
        return map;
    }
Checks if the provided map contains all the provided required non-null
key(s).

@param <K> key type
@param <V> value type
@param map to check
@param requiredKey to check for existence
@return the same instance of the provided map
@throws NoSuchElementException if the required key is not a key in the
provided Map
@throws NullPointerException if the provided Map is null or if the
required key is null
common-parent/invariant/src/main/java/com/speedment/common/invariant/NullUtil.java