### Question:
UserClient { @SuppressWarnings("unchecked") public List<String> update(UserUpdateParam param) { if (param.getUserid() == null) { throw new IllegalArgumentException("userid is required."); } JSONObject params = JSONObject.fromObject(param, defaultConfig); JSONObject result = (JSONObject) accessor.execute("user.update", params); JSONArray userids = result.getJSONArray("userids"); JsonConfig config = defaultConfig.copy(); config.setCollectionType(List.class); config.setRootClass(String.class); return (List<String>) JSONArray.toCollection(userids, config); } UserClient(ZabbixAccessor accessor, JsonConfig defaultConfig); @SuppressWarnings("unchecked") List<User> get(UserGetParam param); String login(UserAuthenticateParam param); @SuppressWarnings("unchecked") List<String> create(UserCreateParam param); @SuppressWarnings("unchecked") List<String> update(UserUpdateParam param); @SuppressWarnings("unchecked") List<String> delete(List<String> userids);  }### Answer:
@Test public void testUpdateIllegalArgument() { UserUpdateParam param = new UserUpdateParam(); param.setAlias("alias1"); try { client.user().update(param); fail(); } catch (IllegalArgumentException ignore) { log.trace(ignore.getMessage()); } }
@Test public void testUpdateNotExist() { UserUpdateParam param = new UserUpdateParam(); param.setUserid("999999"); try { client.user().update(param); fail(); } catch (Exception ignore) { log.trace(ignore.getMessage()); } }