private void testBuildMultipolygon(List<List<Node>> ways, Geometry expected) throws GeometryException {
    Map<Long, Coordinate> coords = new HashMap<>();
    List<LongArrayList> rings = new ArrayList<>();
    for (List<Node> way : ways) {
      LongArrayList ring = new LongArrayList();
      rings.add(ring);
      for (Node node : way) {
        ring.add(node.id);
        coords.put(node.id, new CoordinateXY(node.x, node.y));
      }
    }
    OsmReader.NodeLocationProvider nodeLocs = coords::get;
    Geometry actual = OsmMultipolygon.build(rings, nodeLocs, 0);
    assertSameNormalizedFeature(expected, actual);
  }
This class is ported to Java from https://github.com/omniscale/imposm3/blob/master/geom/multipolygon_test.go
planetiler-core/src/test/java/com/onthegomap/planetiler/reader/osm/OsmMultipolygonTest.java