@Test
    public void testOrphanRemovalList() {
        mapper = getMapper("mappings/removeOrphansMapping.xml");
        Parent parent = new Parent(new Long(1), "parent");
        Child child1 = new Child(new Long(1), "child1");
        List<Child> childrenList = new ArrayList<>();
        childrenList.add(child1);
        parent.setChildrenList(childrenList);

        ParentPrime parentPrime = mapper.map(parent, ParentPrime.class);
        // Make sure the first one was mapped ok.
        assertEquals(parent.getChildrenList().size(), parentPrime.getChildrenList().size());

        ChildPrime child2 = new ChildPrime(new Long(2L), "child2");
        parentPrime.getChildrenList().add(child2);
        mapper.map(parentPrime, parent);
        // Make sure adding one works ok.
        assertEquals(parentPrime.getChildrenList().size(), parent.getChildrenList().size());

        parentPrime.getChildrenList().clear();
        mapper.map(parentPrime, parent);
        // Make sure REMOVING them (the orphan children) works ok.
        assertEquals(parentPrime.getChildrenList().size(), parent.getChildrenList().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