@Override
  public UsersSearchRestResponse toUsersForResponse(List<UserInformation> userInformations, PaginationInformation paginationInformation) {
    List<UserRestResponse> usersForResponse = toUsersForResponse(userInformations);
    PageRestResponse pageRestResponse = new PageRestResponse(paginationInformation.pageIndex(), paginationInformation.pageSize(), paginationInformation.total());
    return new UsersSearchRestResponse(usersForResponse, pageRestResponse);
  }
@Test
  public void toUsersForResponse_whenAdmin_mapsAllFields() {
    when(userSession.isLoggedIn()).thenReturn(true);
    when(userSession.isSystemAdministrator()).thenReturn(true);

    PaginationInformation paging = forPageIndex(1).withPageSize(2).andTotal(3);

    UserInformation userInformation1 = mockSearchResult(1, true);
    UserInformation userInformation2 = mockSearchResult(2, false);

    UsersSearchRestResponse usersForResponse = usersSearchRestResponseGenerator.toUsersForResponse(List.of(userInformation1, userInformation2), paging);

    UserRestResponseForAdmins expectUser1 = buildExpectedResponseForAdmin(userInformation1);
    UserRestResponseForAdmins expectUser2 = buildExpectedResponseForAdmin(userInformation2);
    assertThat(usersForResponse.users()).containsExactly(expectUser1, expectUser2);
    assertPaginationInformationAreCorrect(paging, usersForResponse.page());
  }