### Question:
ItemClient { public List<String> delete(List<String> itemids) { if (itemids == null || itemids.isEmpty()) { throw new IllegalArgumentException("itemid is required."); } JSONArray params = JSONArray.fromObject(itemids, defaultConfig); JSONObject result = (JSONObject) accessor.execute("item.delete", params); JSONArray itemIds = result.getJSONArray("itemids"); JsonConfig config = defaultConfig.copy(); config.setCollectionType(List.class); config.setRootClass(String.class); List<?> list = (List<?>) JSONArray.toCollection(itemIds, config); List<String> itemIdsList = new ArrayList<String>(); for (Object object : list) { if (object instanceof String) { itemIdsList.add(String.class.cast(object)); } else { itemIdsList.add(object.toString()); } } return itemIdsList; } ItemClient(ZabbixAccessor accessor, JsonConfig defaultConfig); @SuppressWarnings("unchecked") List<Item> get(ItemGetParam param); @SuppressWarnings("unchecked") List<String> update(ItemUpdateParam param); List<String> delete(List<String> itemids);  }### Answer:
@Test public void testDeleteIllegalArgument() { try { client.item().delete(null); fail(); } catch (IllegalArgumentException ignore) { log.trace(ignore.getMessage()); } }
@Test public void testDeleteNotExist() { try { client.item().delete(Arrays.asList("99999999")); fail(); } catch (Exception ignore) { log.trace(ignore.getMessage()); } }