@Test
public void testGeometryCollection() throws ParseException {

  final String wkt =
      "GEOMETRYCOLLECTION (POINT (0 0), LINESTRING (10 10, 20 20), LINESTRING (20 20, 10 30))";
  final WKTReader wktReader = new WKTReader();
  final Geometry geometry = wktReader.read(wkt);
  final Geometry actual =
      convertSubpolygonsToEnvelopes.apply(geometry, new GeometryOperator.Context());
  final Geometry expected =
      wktReader.read(
          "GEOMETRYCOLLECTION( POINT (0 0), POLYGON ((10 10, 10 20, 10 30, 20 30, 20 20, 20 10, 10 10)))");
  assertThat(actual, is(expected));
}