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());