@Test
public void accumulate() {

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