ShapeTransformUtil { public static Line transformLine(Line line, Matrix ctm) { return (Line) transformSegment(line, ctm); }  static BezierCurve transformBezierCurve(BezierCurve bezierCurve, Matrix ctm); static Line transformLine(Line line, Matrix ctm); static Path transformPath(Path path, Matrix ctm);  }
@Test public void transformLineTest() { Line inLine = new Line(new Point(0, 0), new Point(10, 10)); Matrix ctm = new Matrix(2, 0, 0, 1, 5, 5); Line outLine = ShapeTransformUtil.transformLine(inLine, ctm); Line cmpLine = new Line(new Point(-2.5, -5), new Point(2.5, 5)); Assert.assertArrayEquals(cmpLine.getBasePoints().toArray(), outLine.getBasePoints().toArray()); }