@Test
public void testPolygonize() throws Exception {

    Geometry lines = wktRdr.read("MULTILINESTRING ((100 100, 200 100), (200 100, 300 100), (100 100, 100 200, 200 200), (200 100, 200 200), (200 200, 300 200, 300 100))");
    Geometry output = GeometryFunctions.polygonize(lines);
    Geometry expectedOutput = wktRdr.read("GEOMETRYCOLLECTION (POLYGON ((200 100, 100 100, 100 200, 200 200, 200 100)), POLYGON ((200 100, 200 200, 300 200, 300 100, 200 100)))");
    assertTrue(output.norm().equalsExact(expectedOutput.norm()));
}