### Question:
JSONArrayDecoder extends AbstractJSONDecoder { @Override public TEvent decode(String source) throws DecodeException { throw new UnsupportedOperationException(); }  @Override TEvent decode(String source); @Override void decode(String source, TEvent event, String target);  }### Answer:
@Test public void test() throws DecodeException { JSONArrayDecoder decoder = new JSONArrayDecoder(); TEvent event = new TEvent(); decoder.decode(stringSource, event, "array"); JSONArray ary = (JSONArray)event.get("array"); Assert.assertEquals(2, ary.size()); }
@Test public void test2() throws DecodeException { JSONArrayDecoder decoder = new JSONArrayDecoder(); TEvent event = new TEvent(); decoder.decode(objectSource, event, "array"); JSONArray ary = (JSONArray)event.get("array"); Assert.assertEquals(2, ary.size()); Assert.assertEquals("name1", ary.getJSONObject(0).getString("name")); Assert.assertEquals("type1", ary.getJSONObject(0).getString("type")); Assert.assertEquals("name2", ary.getJSONObject(1).getString("name")); Assert.assertEquals("type2", ary.getJSONObject(1).getString("type")); }