WorkFlowIdsMessage extends Message<Collection<String>> { @Override public String toJson() { return writeValueAsString(this); } WorkFlowIdsMessage(Collection<String> workflowIds); @Override String toJson();  }
@Test public void testToJson() { Collection<String> workflowIds = new ArrayList<>(); WorkFlowIdsMessage flowIdsMessage = new WorkFlowIdsMessage(workflowIds); assertEquals("{\"body\":[],\"type\":\"workflowIds\"}", flowIdsMessage.toJson()); }