@Test
public void testTwoSubpolygons() throws ParseException {

  String wkt =
      "MULTIPOLYGON (((0 0, 2 10, 10 20, 20 20, 20 0, 0 0)),((0 40, 2 50, 10 60, 20 60, 20 40, 0 40)))";
  WKTReader wktReader = new WKTReader();
  Geometry geometry = wktReader.read(wkt);
  Geometry actual = convertSubpolygonsToEnvelopes.apply(geometry, new GeometryOperator.Context());
  Geometry expected =
      wktReader.read(
          "MULTIPOLYGON (((0 0, 0 20, 20 20, 20 0, 0 0)), ((0 40, 0 60, 20 60, 20 40, 0 40)))");
  assertThat(actual, is(expected));
}