### Question:
AjaxSuccess extends AjaxJson { public AjaxSuccess putSuccess(String key, String value) { addMsg(key, value); return this; } AjaxSuccess(String brief); AjaxSuccess putSuccess(String key, String value);  }### Answer:
@Test public void testPutSuccess() { String expected = "成功操作！"; AjaxSuccess success = new AjaxSuccess(expected); JSONObject json = JSONObject.fromObject(success.toString()); String actual = json.getJSONObject("msg").getString("brief"); Assert.assertEquals("AjaxSuccess 解析错误", true, json.get("success")); Assert.assertEquals("AjaxSuccess 解析错误", expected, actual); }