@Override
    public GrokPattern load(String patternId) throws NotFoundException {
        final GrokPattern pattern = dbCollection.findOneById(new ObjectId(patternId));
        if (pattern == null) {
            throw new NotFoundException("Couldn't find Grok pattern with ID " + patternId);
        }
        return pattern;
    }
@Test
    @MongoDBFixtures("MongoDbGrokPatternServiceTest.json")
    public void load() throws NotFoundException {
        final GrokPattern grokPattern = service.load("56250da2d400000000000001");
        assertThat(grokPattern.name()).isEqualTo("Test1");
        assertThat(grokPattern.pattern()).isEqualTo("[a-z]+");
    }