### Question:
ShapeInMemLayer extends FeatureSourceRetriever implements VectorLayer { @Override public void delete(String featureId) throws LayerException { features.remove(featureId); }  @Override String getId(); void setId(String id); @Override CoordinateReferenceSystem getCrs(); @Api void setLayerInfo(VectorLayerInfo layerInfo); @Override VectorLayerInfo getLayerInfo(); @Override boolean isCreateCapable(); @Override boolean isUpdateCapable(); @Override boolean isDeleteCapable(); @Api void setUrl(String url); Iterator<?> getElements(Filter filter, int offset, int maxResultSize); @Override Envelope getBounds(); Envelope getBounds(Filter filter); @Override FeatureModel getFeatureModel(); @Override Object create(Object feature); @Override Object read(String featureId); @Override Object saveOrUpdate(Object feature); @Override void delete(String featureId);  }### Answer:
@Test public void delete() { try { SimpleFeature f = (SimpleFeature) layer.read(LAYER_NAME + ".3"); Assert.assertNotNull(f); layer.delete(LAYER_NAME + ".3"); Assert.assertTrue(true); } catch (Exception e) { Assert.assertTrue(false); } }