private void resolveNativeEntityGrokPattern(EntityDescriptor entityDescriptor,
                                                InputWithExtractors inputWithExtractors,
                                                MutableGraph<EntityDescriptor> mutableGraph) {
        inputWithExtractors.extractors().stream()
                .filter(e -> e.getType().equals(Extractor.Type.GROK))
                .map(e -> (String) e.getExtractorConfig().get(GrokExtractor.CONFIG_GROK_PATTERN))
                .map(GrokPatternService::extractPatternNames)
                .flatMap(Collection::stream)
                .forEach(patternName -> {
                    grokPatternService.loadByName(patternName).ifPresent(depPattern -> {
                        final EntityDescriptor depEntityDescriptor = EntityDescriptor.create(
                                depPattern.id(), ModelTypes.GROK_PATTERN_V1);
                        mutableGraph.putEdge(entityDescriptor, depEntityDescriptor);
                    });
                });
    }
@Test
    @MongoDBFixtures("InputFacadeTest.json")
    public void resolveNativeEntityGrokPattern() throws NotFoundException {
        final Input input = inputService.find("5ae2ebbeef27464477f0fd8b");
        EntityDescriptor entityDescriptor = EntityDescriptor.create(ModelId.of(input.getId()), ModelTypes.INPUT_V1);
        EntityDescriptor expectedDescriptor = EntityDescriptor.create(ModelId.of("1"), ModelTypes.GROK_PATTERN_V1);
        Graph<EntityDescriptor> graph = facade.resolveNativeEntity(entityDescriptor);
        assertThat(graph.nodes()).contains(expectedDescriptor);
    }