private void resolveNativeEntityLookupTable(EntityDescriptor entityDescriptor,
                                                InputWithExtractors inputWithExtractors,
                                                MutableGraph<EntityDescriptor> mutableGraph) {

        final Stream<String> extractorLookupNames = inputWithExtractors.extractors().stream()
                .filter(e -> e.getType().equals(Extractor.Type.LOOKUP_TABLE))
                .map(e -> (String) e.getExtractorConfig().get(LookupTableExtractor.CONFIG_LUT_NAME));
        final Stream<String> converterLookupNames = inputWithExtractors.extractors().stream()
                .flatMap(e -> e.getConverters().stream())
                .filter(c -> c.getType().equals(Converter.Type.LOOKUP_TABLE))
                .map(c -> (String) c.getConfig().get("lookup_table_name"));

        Stream.concat(extractorLookupNames, converterLookupNames)
                .map(lookupTableService::get)
                .filter(Optional::isPresent)
                .map(Optional::get)
                .forEach(lookupTableDto -> {
                    EntityDescriptor lookupTable = EntityDescriptor.create(
                            ModelId.of(lookupTableDto.id()), ModelTypes.LOOKUP_TABLE_V1);
                    mutableGraph.putEdge(entityDescriptor, lookupTable);
                });
    }
@Test
    @MongoDBFixtures("InputFacadeTest.json")
    public void resolveNativeEntityLookupTable() throws NotFoundException {
        when(lookupuptableBuilder.lookupTable("whois")).thenReturn(lookupuptableBuilder);
        when(lookupuptableBuilder.lookupTable("tor-exit-node-list")).thenReturn(lookupuptableBuilder);
        when(lookupuptableBuilder.build()).thenReturn(lookupTable);
        when(lookupTableService.newBuilder()).thenReturn(lookupuptableBuilder);
        when(lookupTableService.hasTable("whois")).thenReturn(true);
        when(lookupTableService.hasTable("tor-exit-node-list")).thenReturn(true);

        when(lookupTableWhois.id()).thenReturn("dead-beef");
        when(dbLookupTableService.get("whois")).thenReturn(Optional.of(lookupTableWhois));

        when(lookupTableTor.id()).thenReturn("dead-feed");
        when(dbLookupTableService.get("tor-exit-node-list")).thenReturn(Optional.of(lookupTableTor));

        final Input input = inputService.find("5ae2eb0a3d27464477f0fd8b");
        EntityDescriptor entityDescriptor = EntityDescriptor.create(ModelId.of(input.getId()), ModelTypes.INPUT_V1);
        EntityDescriptor expectedEntitiyDescriptorWhois = EntityDescriptor.create(ModelId.of("dead-beef"), ModelTypes.LOOKUP_TABLE_V1);
        EntityDescriptor expectedEntitiyDescriptorTor = EntityDescriptor.create(ModelId.of("dead-feed"), ModelTypes.LOOKUP_TABLE_V1);
        Graph<EntityDescriptor> graph = facade.resolveNativeEntity(entityDescriptor);
        assertThat(graph.nodes()).contains(expectedEntitiyDescriptorWhois);
        assertThat(graph.nodes()).contains(expectedEntitiyDescriptorTor);
    }