3 import static org.testng.Assert.assertEquals;
4 import static org.testng.Assert.assertNull;
6 import org.json.JSONException;
7 import org.json.simple.JSONArray;
8 import org.testng.annotations.Test;
10 public class JSONUtilsTest
12 @Test(groups = "Functional")
13 public void testArrayToList() throws JSONException
15 assertNull(JSONUtils.arrayToList(null));
17 JSONArray ja = new JSONArray();
18 assertNull(JSONUtils.arrayToList(null));
21 assertEquals(JSONUtils.arrayToList(ja), "hello");
24 assertEquals(JSONUtils.arrayToList(ja), "hello,world");