Users { public List<ReadUser> list(int department, boolean fetchChild, Set<UserStatus> statusSet) { int status = 0; if (statusSet != null && statusSet.size() > 0) { for (UserStatus userStatus : statusSet) { status = status + userStatus.getStatus(); } } String url = WxEndpoint.get("url.user.list"); String user = wxClient.get(String.format(url, department, fetchChild ? "1" : "0", status)); logger.debug("list user: {}", user); ReadUserList readUserList = JsonMapper.nonEmptyMapper().fromJson(user, ReadUserList.class); return readUserList.getUsers(); }  static Users defaultUsers(); static Users with(CorpSetting corpSetting); void setWxClient(WxClient wxClient); ReadUser get(String uid); void create(CreateUser user); void update(UpdateUser user); void delete(String uid); List<SimpleUser> simpleList(int department, boolean fetchChild, Set<UserStatus> statusSet); List<SimpleUser> simpleList(int department); List<ReadUser> list(int department, boolean fetchChild, Set<UserStatus> statusSet); List<ReadUser> list(); List<ReadUser> list(int department); void delete(List<String> users); @Deprecated Invitation invite(String uid);  }
@Test public void testList() { ReadUser user = Users.defaultUsers().get(getTestUser()); List<ReadUser> users = Users.defaultUsers().list(user.getDepartment()[0], true, null); Assert.assertNotNull(users); }