public static <E> Set<E> intersection(final Set<E> set1, final Set<?> set2) {
        Set<E> intersection = new HashSet<>(set1);
        intersection.retainAll(set2);
        return intersection;
    }
Internal class that contains various Collection utilities specific to Dozer requirements. Not intended for direct use
by application code.
core/src/main/java/com/github/dozermapper/core/util/CollectionUtils.java