class Utils {
    static <T> T nonNull(T t) {
        if (t == null) {
            throw new IllegalArgumentException();
        }
        return t;
    }

    static <T> T nonNull(T t, String name) {
        if (t == null) {
            throw new IllegalArgumentException(name + " cannot be null");
        }
        return t;
    }

    static <T> T cast(Class<T> clazz, Object o, String name) {<FILL_FUNCTION_BODY>}

    static <U, V> List<V> map(Collection<U> list, Function<U, V> mapper) {
        return list.stream().map(mapper).collect(Collectors.toList());
    }
}

        if (!clazz.isInstance(o)) {
            if (o == null) {
                throw new IllegalArgumentException(name + " is null");
            }
            throw new IllegalArgumentException(name + " is not an instance of " + clazz.getName());
        }
        return clazz.cast(o);
    
<no_super_class>