@Test public void testSetMatchingFrame() throws Exception { Random random = new Random(544354); for (int i = 0; i < ITERATIONS; i++) { ReferenceFrame sourceFrame = EuclidFrameRandomTools.nextReferenceFrame(random, true); ReferenceFrame destinationFrame = EuclidFrameRandomTools.nextReferenceFrame(random, true); FrameConvexPolygon2DReadOnly source = EuclidFrameRandomTools.nextFrameConvexPolygon2D(random, sourceFrame, 1.0, 10); FixedFrameConvexPolygon2DBasics actual = EuclidFrameRandomTools.nextFrameConvexPolygon2D(random, destinationFrame, 1.0, 10); actual.setMatchingFrame(source, true); FrameConvexPolygon2D expected = new FrameConvexPolygon2D(source); expected.changeFrame(destinationFrame); Assert.assertTrue(expected.epsilonEquals((FrameConvexPolygon2D) actual, EPSILON)); } } }