### Question:
PoseStamped extends Message { public static PoseStamped fromMessage(Message m) { return PoseStamped.fromJsonObject(m.toJsonObject()); } PoseStamped();  PoseStamped(Header header, Pose pose); Header getHeader(); Pose getPose(); @Override PoseStamped clone(); static PoseStamped fromJsonString(String jsonString); static PoseStamped fromMessage(Message m); static PoseStamped fromJsonObject(JsonObject jsonObject); static final String FIELD_HEADER; static final String FIELD_POSE; static final String TYPE; }### Answer:
@Test public void testFromMessage() { Message m = new Message(p1.toString()); PoseStamped p = PoseStamped.fromMessage(m); assertEquals(p1.toString(), p.toString()); assertEquals(p1.toJsonObject(), p.toJsonObject()); assertEquals(p1.getMessageType(), p.getMessageType()); assertEquals(p1.getHeader(), p.getHeader()); assertEquals(p1.getPose(), p.getPose()); assertNotSame(p1, p); assertNotSame(p1.toString(), p.toString()); assertNotSame(p1.toJsonObject(), p.toJsonObject()); }