### Question:
MultiArrayLayout extends Message { public static MultiArrayLayout fromMessage(Message m) { return MultiArrayLayout.fromJsonObject(m.toJsonObject()); } MultiArrayLayout();  MultiArrayLayout(MultiArrayDimension[] dim, int dataOffset); int size(); MultiArrayDimension get(int index); MultiArrayDimension[] getDim(); int getDataOffset(); @Override MultiArrayLayout clone(); static MultiArrayLayout fromJsonString(java.lang.String jsonString); static MultiArrayLayout fromMessage(Message m); static MultiArrayLayout fromJsonObject(JsonObject jsonObject); static final java.lang.String FIELD_DIM; static final java.lang.String FIELD_DATA_OFFSET; static final java.lang.String TYPE; }### Answer:
@Test public void testFromMessage() { Message m = new Message(m1.toString()); MultiArrayLayout p = MultiArrayLayout.fromMessage(m); assertEquals(m1.toString(), p.toString()); assertEquals(m1.toJsonObject(), p.toJsonObject()); assertEquals(m1.getMessageType(), p.getMessageType()); assertEquals(m1.size(), p.size()); assertTrue(Arrays.deepEquals(m1.getDim(), p.getDim())); assertEquals(m1.getDataOffset(), p.getDataOffset()); assertNotSame(m1, p); assertNotSame(m1.toString(), p.toString()); assertNotSame(m1.toJsonObject(), p.toJsonObject()); }