class TemplateSelector implements ITemplateSelector {

    @Override
    public SynthTemplate chooseRandom() throws Exception {

        SynthTemplate synthTemplate = null;
        List<SynthTemplate> templateList = new ArrayList<>();
        Iterable<SynthTemplate> synthTemplates = synthTemplateDal.findAll();

        //TODO this is temp code to pick a random synth ..
        synthTemplates.iterator().forEachRemaining(templateList::add);

        int randomIndex = (new Random()).nextInt(templateList.size());
        synthTemplate = templateList.get(randomIndex);

        return synthTemplate;
    }

}