### Question:
SlackMessage implements Serializable { @Override public String toString() { return "{\"username\" : " + (_username == null ? null : "\"" + _username + "\"") + ",\"text\" : " + (_text == null ? null : "\"" + _text + "\"") + ",\"icon_emoji\" : " + (_iconEmoji == null ? null : "\"" + _iconEmoji + "\"") + ",\"channel\" : " + (_channel == null ? null : "\"" + _channel + "\"") + "}"; } SlackMessage(String username, String text, String iconEmoji, String channel); String getUsername(); String getText(); String getIconEmoji(); String getChannel(); @Override String toString();  }### Answer:
@Test public void testSlackMessageJsonFormat() { String expectedJson = "{\"username\" : \"userA\",\"text\" : \"cc alert\",\"icon_emoji\" : \":information_source:" + "\",\"channel\" : \"#cc-alerts\"}"; assertEquals(expectedJson, new SlackMessage("userA", "cc alert", ":information_source:", "#cc-alerts").toString()); }