@Override
    public RuleDao loadByName(String name) throws NotFoundException {
        final String id = titleToId.get(name);
        if (id == null) {
            throw new NotFoundException("No rule with name " + name);
        }
        return load(id);
    }
@Test
    public void loadByName() throws NotFoundException {
        RuleDao rule = RuleDao.create(null, "test", "description", "rule \"test\" when true then end", null, null, null, null);
        final RuleDao savedRule = service.save(rule);
        final RuleDao loadedRule = service.loadByName(savedRule.title());
        assertThat(loadedRule).isEqualTo(savedRule);
    }