ReviewActions { public int[] getReviewIdsForChangelist(int changelistId) throws IOException, SwarmServerResponseException { Map<String, Object> query = new HashMap<>(); query.put("change[]", changelistId); query.put("fields", "id"); List<Integer> ids = new ArrayList<>(); while (true) { BasicResponse resp = requester.get(config, "reviews", query); if (resp.getStatusCode() != 200) { throw resp.getResponseException("reviews", "get", resp.getStatusCode()); } JsonObject body = resp.getBodyAsJson(); JsonArray reviews = JsonUtil.getNullableArrayKey(body, "reviews"); if (reviews != null) { for (int i = 0; i < reviews.size(); i++) { JsonElement review = reviews.get(i); if (review != null && review.isJsonObject()) { int val = JsonUtil.getIntKey(review.getAsJsonObject(), "id"); ids.add(val); } } } String lastSeen = JsonUtil.getNullableStringKey(body, "lastSeen"); if (lastSeen == null) { break; } query.put("after", lastSeen); } int[] ret = new int[ids.size()]; for (int i = 0; i < ret.length; i++) { ret[i] = ids.get(i); } return ret; } ReviewActions(SwarmConfig config); SwarmConfig getConfig(); Review create(String description, int changelistId,
            String[] reviewers, String[] requiredReviewers); Review addChangeToReview(int reviewId, int changelistId); Review getReview(int reviewId); int[] getReviewIdsForChangelist(int changelistId);  }
@Test void getReviewIdsForChangelist() { }