### Question:
UsergroupClient { @SuppressWarnings("unchecked") public List<String> delete(List<String> usrgrpids) { if (usrgrpids == null || usrgrpids.isEmpty()) { throw new IllegalArgumentException("usrgrpid is required."); } JSONArray params = JSONArray.fromObject(usrgrpids, defaultConfig); JSONObject result = (JSONObject) accessor.execute("usergroup.delete", params); JSONArray resultUsrgrpids = result.getJSONArray("usrgrpids"); JsonConfig config = defaultConfig.copy(); config.setCollectionType(List.class); config.setRootClass(String.class); return (List<String>) JSONArray.toCollection(resultUsrgrpids, config); } UsergroupClient(ZabbixAccessor accessor, JsonConfig defaultConfig); @SuppressWarnings("unchecked") List<Usergroup> get(UsergroupGetParam param); @SuppressWarnings("unchecked") List<String> create(UsergroupCreateParam param); List<String> massAdd(UsergroupMassAddParam param); @SuppressWarnings("unchecked") List<String> update(UsergroupUpdateParam param); @SuppressWarnings("unchecked") List<String> delete(List<String> usrgrpids);  }### Answer:
@Test public void testDeleteIllegalArgument() { try { client.usergroup().delete(null); fail(); } catch (IllegalArgumentException ignore) { log.trace(ignore.getMessage()); } }
@Test public void testDeleteNotExist() { try { client.usergroup().delete(Arrays.asList("999999")); } catch (IllegalArgumentException ignore) { log.trace(ignore.getMessage()); } }