GeoToolsFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Geometry getGeometry(Object feature) throws LayerException { Geometry geometry = (Geometry) asFeature(feature).getDefaultGeometry(); geometry.setSRID(srid); return (Geometry) geometry.clone(); } GeoToolsFeatureModel(DataStore dataStore, String featureSourceName, int srid,
			DtoConverterService converterService); @Override Attribute getAttribute(Object feature, String name); @Override Map<String, Attribute> getAttributes(Object feature); @Override Geometry getGeometry(Object feature); @Override String getId(Object feature); @Override int getSrid(); @Override Object newInstance(); @Override Object newInstance(String id); @Override boolean canHandle(Object feature);  }
@Test public void testGetGeometry() throws Exception { Assert.assertEquals(120.99, featureModel.getGeometry(feature).getCoordinate().x, 0.01); }
@Test public void testSetGeometry() throws Exception { WKTReader wktReader = new WKTReader(); Point pt = (Point) wktReader.read("POINT (5 5)"); featureModel.setGeometry(feature, pt); Assert.assertEquals(5, featureModel.getGeometry(feature).getCoordinate().x, 0); }