@Test
    public void testRemoveOrphans() {
        mapper = getMapper("mappings/removeOrphansMapping.xml");

        MyClassA myClassA = new MyClassA();
        MyClassB myClassB = new MyClassB();

        Fruit apple = new Fruit();
        apple.setName("Apple");
        Fruit banana = new Fruit();
        banana.setName("Banana");
        Fruit grape = new Fruit();
        grape.setName("Grape");
        Fruit orange = new Fruit();
        orange.setName("Orange");
        Fruit kiwiFruit = new Fruit();
        kiwiFruit.setName("Kiwi Fruit");

        List<Fruit> srcFruits = new ArrayList<>();
        srcFruits.add(apple);
        srcFruits.add(banana);
        srcFruits.add(kiwiFruit);

        List<Fruit> destFruits = new ArrayList<>();
        destFruits.add(grape); // not in src
        destFruits.add(banana); // shared with src fruits
        destFruits.add(orange); // not in src

        myClassA.setAStringList(srcFruits);
        myClassB.setAStringList(destFruits);

        mapper.map(myClassA, myClassB, "testRemoveOrphansOnList");

        assertEquals(3, myClassB.getAStringList().size());
        assertTrue(myClassB.getAStringList().contains(apple));
        assertTrue(myClassB.getAStringList().contains(banana));
        assertTrue(myClassB.getAStringList().contains(kiwiFruit));
        assertFalse(myClassB.getAStringList().contains(grape));
        assertFalse(myClassB.getAStringList().contains(orange));
    }
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