RunningMessage extends Message<Boolean> { @Override public String toJson() { return writeValueAsString(this); } RunningMessage(boolean body); @Override String toJson();  }
@Test public void testToJson() { RunningMessage message = new RunningMessage(true); assertEquals("{\"body\":true,\"type\":\"running\"}", message.toJson()); }