### Question:
Polygon extends Message { @Override public Polygon clone() { return new Polygon(this.points); } Polygon();  Polygon(Point32[] points); int size(); Point32 get(int index); Point32[] getPoints(); @Override Polygon clone(); static Polygon fromJsonString(String jsonString); static Polygon fromMessage(Message m); static Polygon fromJsonObject(JsonObject jsonObject); static final String FIELD_POINTS; static final String TYPE; }### Answer:
@Test public void testClone() { Polygon clone = p1.clone(); assertEquals(p1.toString(), clone.toString()); assertEquals(p1.toJsonObject(), clone.toJsonObject()); assertEquals(p1.getMessageType(), clone.getMessageType()); assertTrue(Arrays.deepEquals(p1.getPoints(), clone.getPoints())); assertEquals(p1.size(), clone.size()); assertNotSame(p1, clone); assertNotSame(p1.toString(), clone.toString()); assertNotSame(p1.toJsonObject(), clone.toJsonObject()); assertNotSame(p1.getPoints(), clone.getPoints()); }