public Set<GsonProjectMember> getAllProjectMembers(String gitlabUrl, String token, long projectId) {
    String url = format("/projects/%s/members/all", projectId);
    return Set.copyOf(executePaginatedQuery(gitlabUrl, token, url, resp -> GSON.fromJson(resp, GITLAB_PROJECT_MEMBER)));
  }
@Test
  public void getAllProjectMembers_whenCallIsInError_rethrows() {
    String token = "token-toto";
    GitlabToken gitlabToken = new GitlabToken(token);
    List<GsonProjectMember> expectedProjectMembers = expectedProjectMembers();
    when(gitlabPaginatedHttpClient.get(eq(gitlabUrl), eq(gitlabToken), eq("/projects/42/members/all"), any())).thenThrow(new IllegalStateException("exception"));

    assertThatIllegalStateException()
      .isThrownBy(() -> underTest.getAllProjectMembers(gitlabUrl, token, 42))
      .withMessage("exception");
  }