class CompetitionInviteRestServiceImpl extends BaseRestService implements CompetitionInviteRestService {

    @Override
    public RestResult<AssessorInviteOverviewPageResource> getInvitationOverview(long competitionId,
                                                                                int page,
                                                                                List<ParticipantStatusResource> participantStatuses,
                                                                                Optional<Boolean> compliant,
                                                                                Optional<String> assessorName) {
        String baseUrl = format("%s/%s/%s", COMPETITION_INVITE_REST_URL, "get-invitation-overview", competitionId);

        UriComponentsBuilder builder = UriComponentsBuilder.fromPath(baseUrl)
                .queryParam("page", page);

        String convertedStatusesList = simpleJoiner(participantStatuses, ",");
        builder.queryParam("statuses", convertedStatusesList);
        compliant.ifPresent(hasContract -> builder.queryParam("compliant", hasContract));
        assessorName.ifPresent(hasContract -> builder.queryParam("assessorName", hasContract));

        return getWithRestResult(builder.toUriString(), AssessorInviteOverviewPageResource.class);
    }

}