or:
static Geometry combineIntoOneGeometry( Collection<Geometry> geometryCollection ){
     GeometryFactory factory = FactoryFinder.getGeometryFactory( null );

     // note the following geometry collection may be invalid (say with overlapping polygons)
     GeometryCollection geometryCollection =
          (GeometryCollection) factory.buildGeometry( geometryCollection );

     return geometryCollection.union();
 }