@Override
    public Set<GrokPattern> loadAll() {
        try (DBCursor<GrokPattern> grokPatterns = dbCollection.find()) {
            return ImmutableSet.copyOf((Iterator<GrokPattern>) grokPatterns);
        }
    }
@Test
    @MongoDBFixtures("MongoDbGrokPatternServiceTest.json")
    public void loadAll() {
        final Set<GrokPattern> grokPatterns = service.loadAll();
        assertThat(grokPatterns)
                .hasSize(3)
                .contains(
                        GrokPattern.create("56250da2d400000000000001", "Test1", "[a-z]+", null),
                        GrokPattern.create("56250da2d400000000000002", "Test2", "[a-z]+", null),
                        GrokPattern.create("56250da2d400000000000003", "Test3", "%{Test1}-%{Test2}", "56250da2deadbeefcafebabe"));
    }