### Question:
MultiArrayDimension extends Message { public static MultiArrayDimension fromMessage(Message m) { return MultiArrayDimension.fromJsonObject(m.toJsonObject()); } MultiArrayDimension();  MultiArrayDimension(java.lang.String label, int size, int stride); java.lang.String getLabel(); int getSize(); int getStride(); @Override MultiArrayDimension clone(); static MultiArrayDimension fromJsonString(java.lang.String jsonString); static MultiArrayDimension fromMessage(Message m); static MultiArrayDimension fromJsonObject(JsonObject jsonObject); static final java.lang.String FIELD_LABEL; static final java.lang.String FIELD_SIZE; static final java.lang.String FIELD_STRIDE; static final java.lang.String TYPE; }### Answer:
@Test public void testFromMessage() { Message m = new Message(mad1.toString()); MultiArrayDimension p = MultiArrayDimension.fromMessage(m); assertEquals(mad1.toString(), p.toString()); assertEquals(mad1.toJsonObject(), p.toJsonObject()); assertEquals(mad1.getMessageType(), p.getMessageType()); assertEquals(mad1.getLabel(), p.getLabel()); assertEquals(mad1.getSize(), p.getSize()); assertEquals(mad1.getStride(), p.getStride()); assertNotSame(mad1, p); assertNotSame(mad1.toString(), p.toString()); assertNotSame(mad1.toJsonObject(), p.toJsonObject()); }