### Question:
Point implements Serializable { public Point scale(int scaleFactor) { return scale(scaleFactor, scaleFactor); } Point(int x, int y); int getX(); Point withX(int xCoord); int getY(); Point withY(int yCoord); int[] toArray(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); Point add(Point other); Point scale(int scaleFactor); Point scale(int scaleFactorX, int scaleFactorY); Point mirror(); Point transform(ManhattanOrientation orientation);  }### Answer:
@Test public void testScale() { { int x = 2, y = 3, scaleX = 2, scaleY = 5; Point pt = new Point(x, y).scale(scaleX, scaleY); Assert.assertEquals(x * scaleX, pt.getX()); Assert.assertEquals(y * scaleY, pt.getY()); } { int x = 2, y = 3, scale = -1; Point pt = new Point(x, y).scale(scale); Assert.assertEquals(x * scale, pt.getX()); Assert.assertEquals(y * scale, pt.getY()); } }