command.setMap((Map) handler.getContext().getMap());
command.run(new NullProgressMonitor());
layer.getMapInternal().getEditManagerInternal().commitTransaction();
FilterFactory fac = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
Set<String> fids = new HashSet<String>();
fids.add(feature.getID());
fids.add(feature2.getID());
Id id = fac.id(FeatureUtils.stringToId(fac,fids));
FeatureSource<SimpleFeatureType, SimpleFeature> resource = layer.getResource(FeatureSource.class, new NullProgressMonitor());
Not not = fac.not(id);
SimpleFeature newFeature = resource.getFeatures(not).features().next();
assertTrue(newFeature.getDefaultGeometry() instanceof LineString);
assertEquals(toCoord(bb,10,10), ((Geometry) newFeature.getDefaultGeometry()).getCoordinates()[0]);