### Question:
HostClient { @SuppressWarnings("unchecked") public List<String> delete(List<String> hostids) { if (hostids == null || hostids.isEmpty()) { throw new IllegalArgumentException("hostid is required."); } List<?> param; if (accessor.checkVersion("3.0.0") < 0) { List<Map<String, String>> list = new ArrayList<Map<String, String>>(); for (String hostid : hostids) { Map<String, String> map = new HashMap<String, String>(); map.put("hostid", hostid); list.add(map); } param = list; } else { param = hostids; } JSONArray params = JSONArray.fromObject(param, defaultConfig); JSONObject result = (JSONObject) accessor.execute("host.delete", params); JSONArray resultHostids = result.getJSONArray("hostids"); JsonConfig config = defaultConfig.copy(); config.setCollectionType(List.class); config.setRootClass(String.class); return (List<String>) JSONArray.toCollection(resultHostids, config); } HostClient(ZabbixAccessor accessor, JsonConfig defaultConfig); @SuppressWarnings("unchecked") List<Host> get(HostGetParam param); @SuppressWarnings("unchecked") List<String> create(HostCreateParam param); @SuppressWarnings("unchecked") List<String> update(HostUpdateParam param); @SuppressWarnings("unchecked") List<String> delete(List<String> hostids);  }### Answer:
@Test public void testDeleteIllegalArgument() { try { client.host().delete(null); fail(); } catch (IllegalArgumentException ignore) { log.trace(ignore.getMessage()); } }
@Test public void testDeleteNotExist() { try { client.host().delete(Arrays.asList("999999")); fail(); } catch (Exception ignore) { log.trace(ignore.getMessage()); } }