@SafeVarargs
    public static <E> Set<E> intersection(final Supplier<Set<E>> constructor, final Set<E> first, final Set<E>... set) {
        final Set<E> result = constructor.get();
        result.addAll(first);
        for (final Set<E> s : set) {
            result.retainAll(s);
        }
        return result;
    }
@Test
    public void testIntersection() {
        final Set<String> oneSet = mkSet("a", "b", "c");
        final Set<String> anotherSet = mkSet("c", "d", "e");
        final Set<String> intersection = intersection(TreeSet::new, oneSet, anotherSet);

        assertEquals(mkSet("c"), intersection);
        assertEquals(TreeSet.class, intersection.getClass());
    }