ShapeInMemFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Object newInstance() throws LayerException { String id = Long.toString(nextId); nextId++; return CommonFactoryFinder.getFeatureFactory(null).createSimpleFeature( new Object[getSchema().getAttributeCount()], getSchema(), id); } ShapeInMemFeatureModel(DataStore dataStore, String featureSourceName, int srid,
			DtoConverterService converterService); @Override void setLayerInfo(VectorLayerInfo vectorLayerInfo); @Override Attribute getAttribute(Object feature, String name); @Override Map<String, Attribute> getAttributes(Object feature); @Override int getSrid(); @Override Geometry getGeometry(Object feature); @Override String getId(Object feature); @Override Object newInstance(); @Override Object newInstance(String id); @Override void setGeometry(Object feature, Geometry geometry); @Override boolean canHandle(Object feature);  }
@Test public void newInstance() throws Exception { Object newInstance = null; newInstance = featureModel.newInstance(); Assert.assertNotNull(newInstance); newInstance = featureModel.newInstance("1000000"); Assert.assertNotNull(newInstance); String id = null; id = featureModel.getId(newInstance); Assert.assertNotNull(id); }