UnstableContingenciesMessage extends Message<UnstableContingenciesSynthesis> { @Override public String toJson() { return writeValueAsString(this); } UnstableContingenciesMessage(UnstableContingenciesSynthesis unstableContingencies); @Override String toJson();  }
@Test public void testToJson() { Map<String, WCACluster> map = new HashMap<>(); UnstableContingenciesSynthesis unstableContingencies = new UnstableContingenciesSynthesis("str", map); UnstableContingenciesMessage contingenciesMessage = new UnstableContingenciesMessage(unstableContingencies); assertEquals( "{\"body\":{\"workflowId\":\"str\",\"contingenciesCluster\":{}},\"type\":\"unstableContingencies\"}", contingenciesMessage.toJson()); }