class CompetitionSetupMilestoneServiceImpl implements CompetitionSetupMilestoneService {

    @Override
    public ServiceResult<List<MilestoneResource>> createMilestonesForIFSCompetition(Long competitionId) {
        List<MilestoneResource> newMilestones = new ArrayList<>();
        Stream.of(MilestoneType.presetValues()).filter(milestoneType -> !milestoneType.isOnlyNonIfs()).forEach(type ->
            newMilestones.add(milestoneRestService.create(type, competitionId).getSuccess())
        );
        return serviceSuccess(newMilestones);
    }

}