@Override
    public RuleDao load(String id) throws NotFoundException {
        final RuleDao rule = store.get(id);
        if (rule == null) {
            throw new NotFoundException("No such rule with id " + id);
        }
        return rule;
    }
@Test
    public void notFoundException() {

        try {
            service.load("1");
            fail("Should throw an exception");
        } catch (NotFoundException e) {
            assertThat(e).hasMessage("No such rule with id 1");
        }
    }