public JSONObject accumulate(String key, Object value) throws JSONException {
		InternalJSONUtil.testValidity(value);
		Object object = this.getObj(key);
		if (object == null) {
			this.set(key, value);
		} else if (object instanceof JSONArray) {
			((JSONArray) object).set(value);
		} else {
			this.set(key, JSONUtil.createArray(this.config).set(object).set(value));
		}
		return this;
	}
@Test
	public void accumulateTest() {
		final JSONObject jsonObject = JSONUtil.createObj().accumulate("key1", "value1");
		assertEquals("{\"key1\":\"value1\"}", jsonObject.toString());

		jsonObject.accumulate("key1", "value2");
		assertEquals("{\"key1\":[\"value1\",\"value2\"]}", jsonObject.toString());

		jsonObject.accumulate("key1", "value3");
		assertEquals("{\"key1\":[\"value1\",\"value2\",\"value3\"]}", jsonObject.toString());
	}