WorkflowListMessage extends Message<HashMap<String, OnlineWorkflowInfo>> { @Override public String toJson() { return writeValueAsString(this); } WorkflowListMessage(HashMap<String, OnlineWorkflowInfo> workflows); @Override String toJson();  }
@Test public void testToJson() { HashMap<String, OnlineWorkflowInfo> workflows = new HashMap<>(); WorkflowListMessage listMessage = new WorkflowListMessage(workflows); assertEquals("{\"body\":{},\"type\":\"workflows\"}", listMessage.toJson()); }