### Question:
Twist extends Message { public static Twist fromMessage(Message m) { return Twist.fromJsonObject(m.toJsonObject()); } Twist();  Twist(Vector3 linear, Vector3 angular); Vector3 getLinear(); Vector3 getAngular(); @Override Twist clone(); static Twist fromJsonString(String jsonString); static Twist fromMessage(Message m); static Twist fromJsonObject(JsonObject jsonObject); static final String FIELD_LINEAR; static final String FIELD_ANGULAR; static final String TYPE; }### Answer:
@Test public void testFromMessage() { Message m = new Message(t1.toString()); Twist p = Twist.fromMessage(m); assertEquals(t1.toString(), p.toString()); assertEquals(t1.toJsonObject(), p.toJsonObject()); assertEquals(t1.getMessageType(), p.getMessageType()); assertEquals(t1.getLinear(), p.getLinear()); assertEquals(t1.getAngular(), p.getAngular()); assertNotSame(t1, p); assertNotSame(t1.toString(), p.toString()); assertNotSame(t1.toJsonObject(), p.toJsonObject()); }