class ReviewInviteServiceImpl extends InviteService<ReviewInvite> implements ReviewInviteService {

    @Override
    public ServiceResult<AssessorInvitesToSendResource> getAllInvitesToResend(long competitionId, List<Long> inviteIds) {
        return getCompetition(competitionId).andOnSuccess(competition -> {

            List<ReviewInvite> invites = reviewInviteRepository.getByIdIn(inviteIds);
            List<String> recipients = simpleMap(invites, ReviewInvite::getName);
            recipients.sort(String::compareTo);

            return serviceSuccess(new AssessorInvitesToSendResource(
                    recipients,
                    competition.getId(),
                    competition.getName(),
                    getInvitePreviewContent(competition)
            ));
        });
    }

}