### Question:
SpatialOps { public static Envelope boundsOf(RevTree tree) { Envelope env = new Envelope(); tree.forEachBucket(bucket -> bucket.expand(env)); tree.forEachTree(n -> n.expand(env)); tree.forEachFeature(n -> n.expand(env)); return env; }  static org.locationtech.jts.geom.Envelope aggregatedBounds(Node oldObject,
            Node newObject); static Envelope boundsOf(RevTree tree); @Nullable static Envelope boundsOf(RevFeature feat); static Optional<Envelope> boundsOf(
            org.locationtech.geogig.crs.CoordinateReferenceSystem crs); @Nullable static Envelope parseNonReferencedBBOX(final @Nullable String bboxArg); static Polygon toGeometry(Envelope e);  }### Answer:
public @Test void testBoundsOf() throws Exception { final CoordinateReferenceSystem crsLonLat = CRS.decode("EPSG:26918"); final Optional<Envelope> aovLonLat = SpatialOps.boundsOf(crsLonLat); assertTrue("Envelope should not be null", aovLonLat.isPresent()); assertFalse("Envelope should not be null", aovLonLat.get().isNull()); }
public @Test void testBoundsOfEpsgVsEpsgForceLonLat() throws Exception { final CoordinateReferenceSystem crsLatLon = CRS.decode("urn:ogc:def:crs:EPSG::4326"); final CoordinateReferenceSystem crsLonLat = CRS.decode("EPSG:4326"); final Optional<Envelope> aov = SpatialOps.boundsOf(crsLatLon); final Optional<Envelope> aovLonLat = SpatialOps.boundsOf(crsLonLat); assertTrue(aov.isPresent()); assertTrue(aovLonLat.isPresent()); assertNotEquals(aov.get(), aovLonLat.get()); }