PlacemarkGroup extends ProductNodeGroup<Placemark> { @Override public synchronized boolean add(Placemark placemark) { final boolean added = _add(placemark); if (added) { addToVectorData(placemark); } return added; } PlacemarkGroup(Product product, String name, VectorDataNode vectorDataNode); VectorDataNode getVectorDataNode(); synchronized final Placemark getPlacemark(SimpleFeature feature); @Override synchronized boolean add(Placemark placemark); @Override synchronized void add(int index, Placemark placemark); @Override synchronized boolean remove(Placemark placemark); @Override synchronized void dispose();  }
@Test public void testChangingFeature() { placemarkGroup.add(createPlacemark("p1", new PixelPos(3, 1), new GeoPos(12, 34))); placemarkGroup.add(createPlacemark("p2", new PixelPos(5, 4), new GeoPos(16, 48))); placemarkGroup.add(createPlacemark("p3", new PixelPos(6, 2), new GeoPos(-45, 80))); assertAreEqual(placemarkGroup, pinFeatureCollection); final CoordinateArraySequence coordinates = new CoordinateArraySequence( new Coordinate[]{new Coordinate(-30, 70)}); final SimpleFeature changedFeature = placemarkGroup.get(2).getFeature(); changedFeature.setDefaultGeometry(new Point(coordinates, new GeometryFactory())); assertAreEqual(placemarkGroup, pinFeatureCollection); final SimpleFeature[] features = pinFeatureCollection.toArray(new SimpleFeature[pinFeatureCollection.size()]); assertEquals(changedFeature.getDefaultGeometry(), features[2].getDefaultGeometry()); }