@Test public void shouldRemoveFromJSONArray() throws JSONException { Child child = new Child("{ 'test1' : ['value1', 'value2', 'value3' ]}"); child.removeFromJSONArray("test1", "value1"); assertThat( child.getJSONArray("test1").toString(), is(new JSONArray(Arrays.asList("value2", "value3")).toString())); }