@Override
    public Graph<Entity> resolveForInstallation(Entity entity,
                                                Map<String, ValueReference> parameters,
                                                Map<EntityDescriptor, Entity> entities) {
        if (entity instanceof EntityV1) {
            return resolveForInstallation((EntityV1) entity, parameters, entities);
        } else {
            throw new IllegalArgumentException("Unsupported entity version: " + entity.getClass());
        }
    }
@Test
    @MongoDBFixtures({"LookupCacheFacadeTest.json", "LookupDataAdapterFacadeTest.json", "LookupTableFacadeTest.json"})
    public void resolveEntity() {
        final Entity entity = EntityV1.builder()
                .id(ModelId.of("5adf24dd4b900a0fdb4e530d"))
                .type(ModelTypes.LOOKUP_TABLE_V1)
                .data(objectMapper.convertValue(LookupTableEntity.create(
                        ValueReference.of(DefaultEntityScope.NAME),
                        ValueReference.of("http-dsv-no-cache"),
                        ValueReference.of("HTTP DSV without Cache"),
                        ValueReference.of("HTTP DSV without Cache"),
                        ValueReference.of("5adf24b24b900a0fdb4e52dd"),
                        ValueReference.of("5adf24a04b900a0fdb4e52c8"),
                        ValueReference.of("Default single value"),
                        ValueReference.of(LookupDefaultValue.Type.STRING),
                        ValueReference.of("Default multi value"),
                        ValueReference.of(LookupDefaultValue.Type.OBJECT)), JsonNode.class))
                .build();
        final Entity cacheEntity = EntityV1.builder()
                .id(ModelId.of("5adf24b24b900a0fdb4e52dd"))
                .type(ModelTypes.LOOKUP_CACHE_V1)
                .data(objectMapper.convertValue(LookupCacheEntity.create(
                        ValueReference.of(DefaultEntityScope.NAME),
                        ValueReference.of("no-op-cache"),
                        ValueReference.of("No-op cache"),
                        ValueReference.of("No-op cache"),
                        ReferenceMapUtils.toReferenceMap(ImmutableMap.of("type", "none"))
                ), JsonNode.class))
                .build();
        final Entity dataAdapterEntity = EntityV1.builder()
                .id(ModelId.of("5adf24a04b900a0fdb4e52c8"))
                .type(ModelTypes.LOOKUP_ADAPTER_V1)
                .data(objectMapper.convertValue(LookupDataAdapterEntity.create(
                        ValueReference.of(DefaultEntityScope.NAME),
                        ValueReference.of("http-dsv"),
                        ValueReference.of("HTTP DSV"),
                        ValueReference.of("HTTP DSV"),
                        ReferenceMapUtils.toReferenceMap(Collections.emptyMap())
                ), JsonNode.class))
                .build();
        final Map<EntityDescriptor, Entity> entities = ImmutableMap.of(
                cacheEntity.toEntityDescriptor(), cacheEntity,
                dataAdapterEntity.toEntityDescriptor(), dataAdapterEntity);
        final Graph<Entity> graph = facade.resolveForInstallation(entity, Collections.emptyMap(), entities);

        assertThat(graph.nodes())
                .hasSize(3)
                .containsOnly(entity, cacheEntity, dataAdapterEntity);
    }