@Test
  void testThrowWhenNoClosed() {
    var node1 = node(0.5, 0.5);
    var node1a = node(0.5 + 1e-1, 0.5);
    var node2 = node(0.75, 0.5);
    var node3 = node(0.75, 0.75);
    assertThrows(GeometryException.class, () -> testBuildMultipolygon(
      List.of(
        List.of(node1, node2),
        List.of(node2, node3),
        List.of(node1a, node3)
      ),
      GeoUtils.JTS_FACTORY.createGeometryCollection()
    ));
  }
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