### Question:
HostgroupClient { @SuppressWarnings("unchecked") public List<String> create(HostgroupCreateParam param) { if (param.getName() == null || param.getName().length() == 0) { throw new IllegalArgumentException("name is required."); } JSONObject params = JSONObject.fromObject(param, defaultConfig); JSONObject result = (JSONObject) accessor.execute("hostgroup.create", params); JSONArray hostgroupids = result.getJSONArray("groupids"); JsonConfig config = defaultConfig.copy(); config.setCollectionType(List.class); config.setRootClass(String.class); return (List<String>) JSONArray.toCollection(hostgroupids, config); } HostgroupClient(ZabbixAccessor accessor, JsonConfig defaultConfig); @SuppressWarnings("unchecked") List<Hostgroup> get(HostgroupGetParam param); @SuppressWarnings("unchecked") List<String> create(HostgroupCreateParam param); @SuppressWarnings("unchecked") List<String> update(HostgroupUpdateParam param); @SuppressWarnings("unchecked") List<String> delete(List<String> groupids);  }### Answer:
@Test public void testCreateIllegalArgument() { HostgroupCreateParam param = new HostgroupCreateParam(); try { client.hostgroup().create(param); fail(); } catch (IllegalArgumentException ignore) { log.trace(ignore.getMessage()); } }