@Nonnull
    public static <V> Set<V> findDuplicates(@Nonnull final Collection<V>... collections)
    {
        final Set<V> merged = new HashSet<>();
        final Set<V> duplicates = new HashSet<>();
        for (Collection<V> collection : collections) {
            for (V o : collection) {
                if (!merged.add(o)) {
                    duplicates.add(o);
                }
            }
        }
        return duplicates;
    }
@Test
    public void testSingleCollectionWithDuplicates() throws Exception
    {
        // Setup test fixture.
        final List<String> input = Arrays.asList("a", "DUPLICATE", "c", "DUPLICATE");

        // Execute system under test.
        @SuppressWarnings("unchecked")
        final Set<String> result = CollectionUtils.findDuplicates(input);

        // Verify results.
        assertEquals(1, result.size());
        assertTrue(result.contains("DUPLICATE"));
    }