List<Node> targetList = new LinkedList<Node>();
workTree.insert(pointsName, featureList.iterator(), LISTENER, targetList, 1);
assertEquals(1, targetList.size());
Node ref1 = targetList.get(0);
assertEquals(ref1.getObjectId(), workTree.findUnstaged(appendChild(pointsName, idP1)).get()
.getObjectId());
featureList.clear();
featureList.add(new FeatureToDelete(pointsType, idP1));
featureList.add(points2);
featureList.add(points3);
targetList.clear();
workTree.insert(pointsName, featureList.iterator(), LISTENER, targetList, 3);
assertEquals(2, targetList.size());
Node ref2 = targetList.get(0);
Node ref3 = targetList.get(1);
assertFalse(workTree.findUnstaged(appendChild(pointsName, idP1)).isPresent());
assertEquals(ref2.getObjectId(), workTree.findUnstaged(appendChild(pointsName, idP2)).get()
.getObjectId());
assertEquals(ref3.getObjectId(), workTree.findUnstaged(appendChild(pointsName, idP3)).get()
.getObjectId());
}