TrackPointDescriptor extends PointPlacemarkDescriptor { @Override public void setUserDataOf(SimpleFeatureType compatibleFeatureType) { super.setUserDataOf(compatibleFeatureType); compatibleFeatureType.getUserData().put("trackPoints", "true"); } TrackPointDescriptor(); static TrackPointDescriptor getInstance(); @Override DecodeQualification getCompatibilityFor(SimpleFeatureType featureType); @Override void setUserDataOf(SimpleFeatureType compatibleFeatureType); @Override String getRoleName(); @Override String getRoleLabel();  }
@Test public void testSetUserData() throws Exception { SimpleFeatureType ft1 = createCompatibleFT("org.esa.beam.Pineapple"); assertEquals(0, ft1.getUserData().size()); instance.setUserDataOf(ft1); assertEquals(3, ft1.getUserData().size()); assertEquals("geometry", ft1.getUserData().get("defaultGeometry")); assertEquals("true", ft1.getUserData().get("trackPoints")); assertEquals(TrackPointDescriptor.class.getName(), ft1.getUserData().get("placemarkDescriptor")); SimpleFeatureType ft2 = createCompatibleFT("org.esa.beam.Pin"); assertEquals(0, ft2.getUserData().size()); instance.setUserDataOf(ft2); assertEquals(3, ft2.getUserData().size()); assertEquals("geometry", ft2.getUserData().get("defaultGeometry")); assertEquals("true", ft2.getUserData().get("trackPoints")); assertEquals(TrackPointDescriptor.class.getName(), ft2.getUserData().get("placemarkDescriptor")); }