class TemplateSelector implements ITemplateSelector {

    @Override
    public List<SynthTemplate> chooseRandomList(int size) throws Exception {

        List<SynthTemplate> selections = new ArrayList<>();

        for (int i = 0; i < size; i++) {
            selections.add(chooseUniqueRandom(selections.stream().map(synthTemplate -> synthTemplate.getId()).collect(Collectors.toList())));
        }

        return selections;
    }

}