### Question:
GoalStatusArray extends Message { public static GoalStatusArray fromMessage(Message m) { return GoalStatusArray.fromJsonObject(m.toJsonObject()); } GoalStatusArray();  GoalStatusArray(Header header, GoalStatus[] statusList); int size(); GoalStatus get(int index); GoalStatus[] getStatusList(); Header getHeader(); @Override GoalStatusArray clone(); static GoalStatusArray fromJsonString(String jsonString); static GoalStatusArray fromMessage(Message m); static GoalStatusArray fromJsonObject(JsonObject jsonObject); static final String FIELD_HEADER; static final String FIELD_STATUS_LIST; static final String TYPE; }### Answer:
@Test public void testFromMessage() { Message m = new Message(g1.toString()); GoalStatusArray p = GoalStatusArray.fromMessage(m); assertEquals(g1.toString(), p.toString()); assertEquals(g1.toJsonObject(), p.toJsonObject()); assertEquals(g1.getMessageType(), p.getMessageType()); assertEquals(g1.getHeader(), p.getHeader()); assertTrue(Arrays.deepEquals(g1.getStatusList(), p.getStatusList())); assertNotSame(g1, p); assertNotSame(g1.toString(), p.toString()); assertNotSame(g1.toJsonObject(), p.toJsonObject()); assertEquals(g1.size(), p.size()); assertEquals(g1.get(0), p.get(0)); assertEquals(g1.get(1), p.get(1)); }