### Question:
WrenchStamped extends Message { public static WrenchStamped fromMessage(Message m) { return WrenchStamped.fromJsonObject(m.toJsonObject()); } WrenchStamped();  WrenchStamped(Header header, Wrench wrench); Header getHeader(); Wrench getWrench(); @Override WrenchStamped clone(); static WrenchStamped fromJsonString(String jsonString); static WrenchStamped fromMessage(Message m); static WrenchStamped fromJsonObject(JsonObject jsonObject); static final String FIELD_HEADER; static final String FIELD_WRENCH; static final String TYPE; }### Answer:
@Test public void testFromMessage() { Message m = new Message(w1.toString()); WrenchStamped p = WrenchStamped.fromMessage(m); assertEquals(w1.toString(), p.toString()); assertEquals(w1.toJsonObject(), p.toJsonObject()); assertEquals(w1.getMessageType(), p.getMessageType()); assertEquals(w1.getHeader(), p.getHeader()); assertEquals(w1.getWrench(), p.getWrench()); assertNotSame(w1, p); assertNotSame(w1.toString(), p.toString()); assertNotSame(w1.toJsonObject(), p.toJsonObject()); }