Map targets = o1.getTargets();
assertNotNull(targets);
assertEquals(3, targets.size());
MapToManyTarget newTarget = o1
.getObjectContext()
.newObject(MapToManyTarget.class);
newTarget.setName("X");
newTarget.setMapToMany(o1);
assertSame(o1, newTarget.getMapToMany());
assertEquals(4, targets.size());
assertSame(newTarget, o1.getTargets().get("X"));
o1.getObjectContext().commitChanges();