@Test
public void append() {

    JSONObject obj = new JSONObject();
    assertSame(obj, obj.append("bar", 42));
    obj.append("bar", 33);
    assertEquals(2, obj.getJSONArray("bar").length());
    assertEquals(42, obj.getJSONArray("bar").get(0));
    assertEquals(33, obj.getJSONArray("bar").get(1));
}