### Question:
GeoGigDataStore extends ContentDataStore implements DataStore { public SimpleFeatureSource getDiffFeatureSource(final String typeName, final String oldRoot, final ChangeType changeType) throws IOException { Preconditions.checkNotNull(typeName, "typeName"); Preconditions.checkNotNull(oldRoot, "oldRoot"); Preconditions.checkNotNull(changeType, "changeType"); final Name name = name(typeName); final ContentEntry entry = ensureEntry(name); GeogigFeatureSource featureSource = new GeogigFeatureSource(entry); featureSource.setTransaction(Transaction.AUTO_COMMIT); featureSource.setChangeType(changeType); if (ObjectId.NULL.toString().equals(oldRoot) || RevTree.EMPTY_TREE_ID.toString().equals(oldRoot)) { featureSource.setOldRoot(null); } else { featureSource.setOldRoot(oldRoot); } return featureSource; } GeoGigDataStore(GeoGIG geogig); @Override void dispose(); @Deprecated void setBranch(@Nullable final String branchName); void setHead(@Nullable final String refspec); @Deprecated String getOrFigureOutBranch(); String getOrFigureOutHead(); GeoGIG getGeogig(); @Deprecated String getConfiguredBranch(); @Nullable String getConfiguredHead(); boolean isAllowTransactions(); @Nullable String getCheckedOutBranch(); ImmutableList<String> getAvailableBranches(); Context getCommandLocator(@Nullable Transaction transaction); Name getDescriptorName(NodeRef treeRef); NodeRef findTypeRef(Name typeName, @Nullable Transaction tx); @Override void createSchema(SimpleFeatureType featureType); void removeSchema(Name name); void removeSchema(String name); SimpleFeatureSource getDiffFeatureSource(final String typeName, final String oldRoot,
            final ChangeType changeType);  }### Answer:
@Test public void testGetDiffFeatureSource() throws Exception { insertAndAdd(points1); insertAndAdd(lines1, lines2); final ObjectId c1 = commit(); insertAndAdd(points2); final ObjectId c2 = commit(); deleteAndAdd(points2); final ObjectId c3 = commit(); insertAndAdd(points1_modified); final ObjectId c4 = commit(); testDiffFeatures(ObjectId.NULL, c1, 1, 0, 0); testDiffFeatures(c1, c2, 1, 0, 0); testDiffFeatures(c2, c1, 0, 1, 0); testDiffFeatures(ObjectId.NULL, c2, 2, 0, 0); testDiffFeatures(c3, c4, 0, 0, 1); testDiffFeatures(c4, c3, 0, 0, 1); testDiffFeatures(c2, c4, 0, 1, 1); testDiffFeatures(c4, c2, 1, 0, 1); }