### Question:
Orientation implements Serializable { public Orientation concatenate(Orientation that) { boolean mirrorX = this.jMirrorX ^ that.jMirrorX; boolean mirrorY = this.jMirrorY ^ that.jMirrorY; int angle = that.jMirrorX^that.jMirrorY ? that.jAngle - this.jAngle : that.jAngle + this.jAngle; return fromJava(angle, mirrorX, mirrorY); } private  Orientation(int jAngle, boolean jMirrorX, boolean jMirrorY, Orientation inverse); static Orientation fromJava(int jAngle, boolean jMirrorX, boolean jMirrorY); static Orientation fromC(int cAngle, boolean cTranspose); static Orientation fromAngle(int angle); Orientation inverse(); Orientation canonic(); Orientation concatenate(Orientation that); int getCAngle(); boolean isCTranspose(); int getAngle(); boolean isXMirrored(); boolean isYMirrored(); boolean isManhattan(); AffineTransform pureRotate(); AffineTransform rotateAbout(Point2D c); AffineTransform rotateAbout(double cX, double cY); AffineTransform rotateAbout(double aX, double aY, double bX, double bY); int transformAngle(int angle); void transformPoints(int numPoints, int[] srcCoords, int[] dstCoords); void transformPoints(int numPoints, int[] coords); void rectangleBounds(Rectangle2D src, Point2D c, Rectangle2D dst); void rectangleBounds(double xl, double yl, double xh, double yh, double cx, double cy, Rectangle2D dst); void rectangleBounds(int[] coords); String toJelibString(); String toString(); static final Orientation IDENT; static final Orientation R; static final Orientation RR; static final Orientation RRR; static final Orientation X; static final Orientation XR; static final Orientation XRR; static final Orientation XRRR; static final Orientation Y; static final Orientation YR; static final Orientation YRR; static final Orientation YRRR; static final Orientation XY; static final Orientation XYR; static final Orientation XYRR; static final Orientation XYRRR; }### Answer:
@Test public void testConcatenate() { System.out.println("testConcatenate"); Orientation[] or = makeConcatTests(); for (int i = 0; i < or.length; i++) { Orientation orI = or[i]; AffineTransform afI = orI.pureRotate(); for (int j = 0; j < or.length; j++) { Orientation orJ = or[j]; AffineTransform afJ = orJ.pureRotate(); Orientation orC = orI.concatenate(orJ); AffineTransform afC = (AffineTransform) afI.clone(); afC.concatenate(afJ); assertTransformsEquals(afC, orC.pureRotate(), Math.ulp(1)); } } }