### Question:
PGgeometryConverter { public static org.postgis.Geometry convert(Geometry geometry) { if (geometry instanceof Point) { return convert((Point) geometry); } else if (geometry instanceof LinearRing) { return convert((LinearRing) geometry); } else if (geometry instanceof LineString) { return convert((LineString) geometry); } else if (geometry instanceof MultiLineString) { return convert((MultiLineString) geometry); } else if (geometry instanceof Polygon) { return convert((Polygon) geometry); } else if (geometry instanceof PolyHedralSurface) { return convert((PolyHedralSurface) geometry); } else if (geometry instanceof MultiPoint) { return convert((MultiPoint) geometry); } else if (geometry instanceof MultiPolygon) { return convert((MultiPolygon) geometry); } else if (geometry instanceof GeometryCollection) { return convert((GeometryCollection) geometry); } else { throw new IllegalArgumentException(geometry.getClass().getName()); } } private  PGgeometryConverter(); static org.postgis.Geometry convert(Geometry geometry); static Geometry convert(org.postgis.Geometry geometry);  }### Answer:
@Test public void roundTrip() { List<Geometry> geometries = getGeometries(); for (Geometry geometry : geometries) { org.postgis.Geometry converted = PGgeometryConverter.convert(geometry); Geometry back = PGgeometryConverter.convert(converted); assertEquals(geometry, back); } }