@Override
    public GrokPattern load(String patternId) throws NotFoundException {
        final GrokPattern pattern = store.get(patternId);
        if (pattern == null) {
            throw new NotFoundException("Couldn't find Grok pattern with ID " + patternId);
        }
        return pattern;
    }
@Test
    public void load() throws Exception {
        final GrokPattern pattern = service.save(GrokPattern.create("NAME", ".*"));

        final GrokPattern loaded = service.load(pattern.id());

        assertThat(loaded)
                .isNotNull()
                .isEqualTo(pattern);

        assertThatExceptionOfType(NotFoundException.class)
                .isThrownBy(() -> service.load("whatever"))
                .withMessage("Couldn't find Grok pattern with ID whatever");
    }