try {
System.out.println("In: test_appendArray");
System.setProperty("org.apache.wink.common.model.json.factory.impl", "org.apache.wink.json4j.compat.impl.ApacheJSONFactory");
JSONFactory factory = JSONFactory.newInstance();
JSONObject jObject = factory.createJSONObject();
JSONArray array = factory.createJSONArray();
array.put("Hello World.");
jObject.put("array", array);
JSONArray array1 = (JSONArray)jObject.get("array");
assertTrue(array1 != null);
assertTrue(array1 instanceof JSONArray);
assertTrue(array1.length() == 1);
jObject.append("array", "Another string.");
JSONArray array2 = (JSONArray)jObject.get("array");
assertTrue(array2 != null);
assertTrue(array2 instanceof JSONArray);
assertTrue(array2.length() == 2);
} catch (Exception ex1) {
ex = ex1;
ex.printStackTrace();
}
assertTrue(ex == null);