@Test
    public void testSetToCollection() {
        NamesSet from = newInstance(NamesSet.class);
        NamesCollection to;
        Set<String> names = newInstance(HashSet.class);
        names.add("Red");
        names.add("Blue");
        names.add("Green");
        names.add("Green");
        from.setNames(names);

        to = mapper.map(from, NamesCollection.class);

        assertNotNull(to);
        assertTrue(to.getNames() instanceof Set);
        assertThat(to.getNames().size(), is(3));
        assertEquals(names.size(), to.getNames().size());
    }
When the source type is a Set and the destination is a Collection we expect that the
mapper narrows to the Set type instead of using a List by default.
<p>
issue https://github.com/DozerMapper/dozer/issues/287
core/src/test/java/com/github/dozermapper/core/functional_tests/GranularDozerBeanMapperTest.java