@Test
public void joinArray() {

    String str = "[33.5, 42, \"foo\", true, apple]";
    JSONArray array = new JSONArray(str);
    assertEquals("33.5, 42, \"foo\", true, \"apple\"", array.join(", "));
}