}
@Test
public void transformGeometryEmptyResultOnException() throws Exception {
GeometryFactory geometryFactory = new GeometryFactory();
WKTReader reader = new WKTReader( geometryFactory );
Point point = (Point) reader.read("POINT (1 1)");
Geometry geometry = geoService.transform(point, new ThrowingTransform());
Assert.assertEquals(Point.class, geometry.getClass());
Assert.assertTrue(geometry.isEmpty());
LineString lineString = (LineString) reader.read("LINESTRING (0 1,1 1)");
geometry = geoService.transform(lineString, new ThrowingTransform());
Assert.assertEquals(LineString.class, geometry.getClass());
Assert.assertTrue(geometry.isEmpty());
Polygon polygon = (Polygon) reader.read("POLYGON ((0 0,1 1,0 1,0 0))");
geometry = geoService.transform(polygon, new ThrowingTransform());
Assert.assertEquals(Polygon.class, geometry.getClass());
Assert.assertTrue(geometry.isEmpty());
MultiPoint multipoint = (MultiPoint) reader.read("MULTIPOINT ((1 1),(2 1))");
geometry = geoService.transform(multipoint, new ThrowingTransform());
Assert.assertEquals(MultiPoint.class, geometry.getClass());
Assert.assertTrue(geometry.isEmpty());
MultiLineString multilineString = (MultiLineString) reader.read("MULTILINESTRING ((0 1,1 1),(0 2,2 2))");
geometry = geoService.transform(multilineString, new ThrowingTransform());
Assert.assertEquals(MultiLineString.class, geometry.getClass());
Assert.assertTrue(geometry.isEmpty());
MultiPolygon multipolygon = (MultiPolygon) reader.read("MULTIPOLYGON (((0 0,1 1,0 1,0 0)),((0 0,2 2,0 2,0 0)))");
geometry = geoService.transform(multipolygon, new ThrowingTransform());
Assert.assertEquals(MultiPolygon.class, geometry.getClass());
Assert.assertTrue(geometry.isEmpty());
Geometry collection = (GeometryCollection) reader.read("GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(4 6,7 10)) ");
geometry = geoService.transform(collection, new ThrowingTransform());
Assert.assertEquals(GeometryCollection.class, geometry.getClass());
Assert.assertTrue(geometry.isEmpty());
}