### Question:
GeogigFeatureStore extends ContentFeatureStore { @Override public void removeFeatures(Filter filter) throws IOException { Preconditions.checkState(getDataStore().isAllowTransactions(), "Transactions not supported; head is not a local branch"); final WorkingTree workingTree = delegate.getWorkingTree(); final String typeTreePath = delegate.getTypeTreePath(); filter = (Filter) filter.accept(new SimplifyingFilterVisitor(), null); if (Filter.INCLUDE.equals(filter)) { workingTree.delete(typeTreePath); return; } if (Filter.EXCLUDE.equals(filter)) { return; } Iterator<SimpleFeature> featureIterator = featureIterator(filter); Iterator<String> affectedFeaturePaths = Iterators.transform(featureIterator, new Function<SimpleFeature, String>() { @Override public String apply(SimpleFeature input) { String fid = input.getID(); return NodeRef.appendChild(typeTreePath, fid); } }); workingTree.delete(affectedFeaturePaths); } GeogigFeatureStore(ContentEntry entry); @Override GeoGigDataStore getDataStore(); GeogigFeatureSource getFeatureSource(); @Override ContentEntry getEntry(); @Override ResourceInfo getInfo(); @Override Name getName(); @Override QueryCapabilities getQueryCapabilities(); @Override ContentState getState(); @Override synchronized Transaction getTransaction(); @Override synchronized void setTransaction(Transaction transaction); @Override final List<FeatureId> addFeatures(
            FeatureCollection<SimpleFeatureType, SimpleFeature> featureCollection); @Override void modifyFeatures(Name[] names, Object[] values, Filter filter); @Override void removeFeatures(Filter filter);  }### Answer:
@Test public void testRemoveFeatures() throws Exception { insertAndAdd(lines1, lines2, lines3); insertAndAdd(points1, points2, points3); geogig.command(CommitOp.class).call(); Id filter = ff.id(Collections.singleton(ff.featureId(idP1))); Transaction tx = new DefaultTransaction(); points.setTransaction(tx); try { assertEquals(3, points.getFeatures().size()); points.removeFeatures(filter); assertEquals(2, points.getFeatures().size()); assertEquals(3, dataStore.getFeatureSource(pointsTypeName).getFeatures().size()); tx.commit(); assertEquals(2, dataStore.getFeatureSource(pointsTypeName).getFeatures().size()); } catch (Exception e) { tx.rollback(); throw e; } finally { tx.close(); } points.setTransaction(Transaction.AUTO_COMMIT); assertEquals(2, points.getFeatures().size()); assertEquals(0, points.getFeatures(filter).size()); }