public Set<GsonUser> getAllGroupMembers(String gitlabUrl, String token, String groupId) {
    return getMembers(gitlabUrl, token, format(GITLAB_GROUPS_MEMBERS_ENDPOINT + "/all", groupId));
  }
@Test
  public void getAllGroupMembers_whenCallIsSuccessful_deserializesAndReturnsCorrectlyGroupMembers() throws IOException {
    ArgumentCaptor<Function<String, List<GsonUser>>> deserializerCaptor = ArgumentCaptor.forClass(Function.class);

    String token = "token-toto";
    GitlabToken gitlabToken = new GitlabToken(token);
    List<GsonUser> expectedGroupMembers = expectedGroupMembers();
    when(gitlabPaginatedHttpClient.get(eq(gitlabUrl), eq(gitlabToken), eq("/groups/42/members/all"), deserializerCaptor.capture())).thenReturn(expectedGroupMembers);

    Set<GsonUser> actualGroupMembers = underTest.getAllGroupMembers(gitlabUrl, token, "42");
    assertThat(actualGroupMembers).containsExactlyInAnyOrderElementsOf(expectedGroupMembers);

    String responseContent = getResponseContent("group-members-full-response.json");

    List<GsonUser> deserializedUsers = deserializerCaptor.getValue().apply(responseContent);
    assertThat(deserializedUsers).usingRecursiveComparison().isEqualTo(expectedGroupMembers);
  }