### Question:
EventJsonParser { @SuppressWarnings("unchecked") public static Event[] parseEventArray(String json) { if (null == json || "".equals(json)) { return null; } try { List<LinkedHashMap<String, Object>> evtMap = objectMapper.readValue(json, List.class); Event[] eArray = new Event[evtMap.size()]; int idx = 0; for (LinkedHashMap<String, Object> ll : evtMap) { eArray[idx++] = parseEventMap(ll); } return eArray; } catch (Exception e) { throw new IllegalArgumentException("Cannot parse JSON " + json, e); } } private  EventJsonParser(); @SuppressWarnings("unchecked") static Event parseEvent(String json); static String eventArrayToJson(Event[] events); @SuppressWarnings("unchecked") static Event[] parseEventArray(String json);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testparseEventArrayError() { EventJsonParser.parseEventArray("something:invalid"); }
@Test public void testparseFeatureArrayEmpty() { Assert.assertNull(EventJsonParser.parseEventArray(null)); Assert.assertNull(EventJsonParser.parseEventArray("")); }