GeometryFactory gf = new GeometryFactory();
LineString ls = gf.createLineString(new Coordinate[] {new Coordinate(10, 15), new Coordinate(20, 25)});
ls.setUserData(CRS.decode("urn:x-ogc:def:crs:EPSG:6.11.2:4326"));
// see if coordinates gets flipped, urn forces lat/lon interpretation
Intersects original = ff.intersects(ff.property("geom"), ff.literal(ls));
Filter clone = (Filter) original.accept(reprojector, null);
assertNotSame(original, clone);
Intersects isClone = (Intersects) clone;
assertEquals(isClone.getExpression1(), original.getExpression1());
LineString clonedLs = (LineString) ((Literal) isClone.getExpression2()).getValue();
assertTrue(15 == clonedLs.getCoordinateN(0).x);
assertTrue(10 == clonedLs.getCoordinateN(0).y);
assertTrue(25 == clonedLs.getCoordinateN(1).x);
assertTrue(20 == clonedLs.getCoordinateN(1).y);
assertEquals(CRS.decode("EPSG:4326"), clonedLs.getUserData());