PolygonGenerator pgc = new PolygonGenerator();
pgc.setGeometryFactory(geometryFactory);
pgc.setGenerationAlgorithm(PolygonGenerator.BOX);
pgc.setNumberPoints(1000);
pgc.setNumberHoles(4);
MultiGenerator pg = new MultiGenerator(pgc);
pg.setBoundingBox(new Envelope(0,10,0,10));
pg.setNumberGeometries(3);
pg.setGeometryFactory(geometryFactory);
MultiPolygon pt = (MultiPolygon) pg.create();
// System.out.println((pt==null?"NULL":pt.toString()));
GMLWriter out = new GMLWriter();
out.setPrefix(null);
out.write(pt,getWriter());