Function exp = ff.function("mincircle", ff.property("geom"));
SimpleFeatureIterator iter = featureCollection.features();
while (iter.hasNext()) {
SimpleFeature feature = iter.next();
Geometry geom = (Geometry) feature.getDefaultGeometry();
Geometry circle = new MinimumBoundingCircle(geom).getCircle();
Object value = exp.evaluate(feature);
assertTrue(value instanceof Polygon);
assertTrue(circle.equals((Geometry) value));
}
iter.close();