class BaseRequest {

    private final Session session;

    protected BaseRequest(@Nonnull Session session) {
        this.session = nonNull(session, "session cannot be null");
    }

    @Nonnull
    public Session getSession() {
        return session;
    }

    public static <T> T nonNull(T obj, String message) {
        if (obj == null) {
            throw new IllegalArgumentException(message);
        }
        return obj;
    }

    protected static <T> Collection<T> unmodifiable(Collection<T> obj) {<FILL_FUNCTION_BODY>}
}

        return obj != null && !obj.isEmpty()
                ? Collections.unmodifiableCollection(new ArrayList<>(obj))
                : Collections.emptyList();
    
<no_super_class>