### Question:
CursorPoint { public CursorPoint getCursorPointRotatedBy(double angleOfRotation) { int rotatedX = (int) (Math.cos(angleOfRotation) * this.x - Math.sin(angleOfRotation) * this.y); int rotatedY = (int) (Math.sin(angleOfRotation) * this.x + Math.cos(angleOfRotation) * this.y); return (new CursorPoint(rotatedX, rotatedY, delay)); } CursorPoint(int x, int y, int delay); double getDistanceFromOrigin(); double getThetaFromOrigin(); CursorPoint getCursorPointTranslatedBy(CursorPoint startingCursorPoint); CursorPoint getCursorPointScaledBy(double scaleFactor); CursorPoint getCursorPointRotatedBy(double angleOfRotation); CursorPoint getCursorPointTransformedByParabola(double[] parabolaEquation); CursorPoint getCursorPointWithNewDelay(int delay); void display(); public int x; public int y; public int delay; }### Answer:
@Test void testCursorPointRotation() { CursorPoint a = new CursorPoint(0, 0, 0); CursorPoint b = new CursorPoint(10, 0, 0); CursorPoint c = new CursorPoint(10, 20, 0); CursorPoint d = a.getCursorPointRotatedBy(Math.PI / 4); CursorPoint e = b.getCursorPointRotatedBy(Math.PI / 3); CursorPoint f = c.getCursorPointRotatedBy(-Math.PI / 6); CursorPoint g = b.getCursorPointRotatedBy(-Math.PI / 6); assertTrue(d.x == 0 && d.y == 0); assertTrue(e.x == 5 && e.y == 8); assertTrue(f.x == 18 && f.y == 12); assertTrue(g.x == 8 && g.y == -4); }