### Question:
Int8MultiArray extends Message { public static Int8MultiArray fromMessage(Message m) { return Int8MultiArray.fromJsonObject(m.toJsonObject()); } Int8MultiArray();  Int8MultiArray(MultiArrayLayout layout, byte[] data); MultiArrayLayout getLayout(); int size(); byte get(int index); byte[] getData(); @Override Int8MultiArray clone(); static Int8MultiArray fromJsonString(java.lang.String jsonString); static Int8MultiArray fromMessage(Message m); static Int8MultiArray fromJsonObject(JsonObject jsonObject); static final java.lang.String FIELD_LAYOUT; static final java.lang.String FIELD_DATA; static final java.lang.String TYPE; }### Answer:
@Test public void testFromMessage() { Message m = new Message(a1.toString()); Int8MultiArray p = Int8MultiArray.fromMessage(m); assertEquals(a1.toString(), p.toString()); assertEquals(a1.toJsonObject(), p.toJsonObject()); assertEquals(a1.getMessageType(), p.getMessageType()); assertEquals(a1.size(), p.size()); assertTrue(Arrays.equals(a1.getData(), p.getData())); assertEquals(a1.getLayout(), p.getLayout()); assertNotSame(a1, p); assertNotSame(a1.toString(), p.toString()); assertNotSame(a1.toJsonObject(), p.toJsonObject()); }