### Question:
TopologyUtils { public static FreedomPolygon translate(FreedomShape input, int xoffset, int yoffset) { if (input instanceof FreedomPolygon) { return (translate((FreedomPolygon) input, xoffset, yoffset)); } else { throw new UnsupportedOperationException("Not yet implemented"); } } private  TopologyUtils(); static Shape convertToAWT(FreedomShape input); static Shape convertToAWT(FreedomShape input, double xScale, double yScale); static Color convertColorToAWT(FreedomColor color); static FreedomPolygon translate(FreedomShape input, int xoffset, int yoffset); static FreedomPolygon rotate(FreedomPolygon input, int degrees); static boolean intersects(FreedomPolygon source, FreedomPolygon target); static boolean contains(FreedomShape fShape, FreedomPoint fPoint);  }### Answer:
@Test public void testTranslate() { System.out.println("Translate a polygon"); FreedomPolygon input = new FreedomPolygon(); input.append(new FreedomPoint(0, 0)); input.append(new FreedomPoint(100, 0)); input.append(new FreedomPoint(100, 100)); input.append(new FreedomPoint(0, 100)); int xoffset = 50; int yoffset = 50; FreedomPolygon expResult = new FreedomPolygon(); expResult.append(new FreedomPoint(50, 50)); expResult.append(new FreedomPoint(150, 50)); expResult.append(new FreedomPoint(150, 150)); expResult.append(new FreedomPoint(50, 150)); FreedomPolygon result = TopologyUtils.translate(input, xoffset, yoffset); assertEquals(expResult.toString(), result.toString()); }