@Override
    public Optional<GrokPattern> loadByName(String name) {
        final GrokPattern pattern = dbCollection.findOne(DBQuery.is("name", name));
        return Optional.ofNullable(pattern);
    }
@Test
    @MongoDBFixtures("MongoDbGrokPatternServiceTest.json")
    public void loadByNameWithMissingGrokPattern() {
        final Optional<GrokPattern> grokPattern = service.loadByName("DOES_NOT_EXIST");
        assertThat(grokPattern).isEmpty();
    }