GeometryCollectionBuilder { public GeometryCollectionBuilder addWkt(String wkt) { if (StringUtils.isBlank(wkt)) { return this; } if (notEmpty) { stringBuilder.append(", "); } stringBuilder.append(wkt); notEmpty = true; return this; } GeometryCollectionBuilder(); GeometryCollectionBuilder polygon(double... points); GeometryCollectionBuilder addWkt(String wkt); @Override String toString();  }
@Test public void testAddWkt() { GeometryCollectionBuilder geometryCollectionBuilder = new GeometryCollectionBuilder(); geometryCollectionBuilder.addWkt("LINESTRING (30 10, 10 30, 40 40)"); assertThat( geometryCollectionBuilder.toString(), is("GEOMETRYCOLLECTION (LINESTRING (30 10, 10 30, 40 40))")); }