public SearchRequest setIssues(@Nullable List<String> issues) {
    if (issues != null) {
      checkArgument(issues.size() <= MAX_PAGE_SIZE, "Number of issue keys must be less than " + MAX_PAGE_SIZE + " (got " + issues.size() + ")");
    }
    this.issues = issues;
    return this;
  }
@Test
  public void setIssues_whenSizeOfTheListIsGreaterThan500_throwException() {
    List<String> issues = asList(new String[501]);
    SearchRequest underTest = new SearchRequest();
    assertThatThrownBy(() -> underTest.setIssues(issues))
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage("Number of issue keys must be less than 500 (got 501)");
  }