@Ignore
@Test
public void testMultiPolygonWithHole2LineString() throws Exception {
setTarget("name2", "LineString", builder.safeCreateGeometry(LineString.class, new Coordinate[]{new Coordinate(10,10)}));
LinearRing r1 = builder.safeCreateGeometry(LinearRing.class, new Coordinate[]{
new Coordinate(0,0), new Coordinate(10,0), new Coordinate(10,10), new Coordinate(0,10), new Coordinate(0,0)
});
LinearRing r2 = builder.safeCreateGeometry(LinearRing.class, new Coordinate[]{
new Coordinate(2,2), new Coordinate(8,2), new Coordinate(8,8), new Coordinate(2,2),
});
GeometryFactory fac=new GeometryFactory();
Polygon poly = fac.createPolygon(r1, new LinearRing[]{r2});
setSource("MultiPolygon", fac.createMultiPolygon(new Polygon[]{poly}));
copyFeatures(LineString.class, 2);
ILayer layer = targetMap.getMapLayers().get(0);
FeatureIterator<SimpleFeature> iter = layer.getResource(FeatureSource.class, null).getFeatures(layer.getFilter()).features();
SimpleFeature feature=iter.next();
assertTrue( r1.equals(feature.getDefaultGeometry()) || r2.equals(feature.getDefaultGeometry()) );
feature=iter.next();
assertTrue( r1.equals(feature.getDefaultGeometry()) || r2.equals(feature.getDefaultGeometry()) );
iter.close();
}