@Override
    public Optional<NativeEntity<LookupTableDto>> findExisting(Entity entity, Map<String, ValueReference> parameters) {
        if (entity instanceof EntityV1) {
            return findExisting((EntityV1) entity, parameters);
        } else {
            throw new IllegalArgumentException("Unsupported entity version: " + entity.getClass());
        }
    }
@Test
    @MongoDBFixtures("LookupTableFacadeTest.json")
    public void findExisting() {
        final Entity entity = EntityV1.builder()
                .id(ModelId.of("1"))
                .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("cache-id"),
                        ValueReference.of("data-adapter-id"),
                        ValueReference.of("Default single value"),
                        ValueReference.of(LookupDefaultValue.Type.STRING),
                        ValueReference.of("Default multi value"),
                        ValueReference.of(LookupDefaultValue.Type.OBJECT)), JsonNode.class))
                .build();
        final NativeEntity<LookupTableDto> existingEntity = facade.findExisting(entity, Collections.emptyMap()).orElseThrow(AssertionError::new);

        assertThat(existingEntity.descriptor().id()).isEqualTo(ModelId.of("5adf24dd4b900a0fdb4e530d"));
        assertThat(existingEntity.descriptor().type()).isEqualTo(ModelTypes.LOOKUP_TABLE_V1);
        assertThat(existingEntity.entity().name()).isEqualTo("http-dsv-no-cache");
        assertThat(existingEntity.entity().title()).isEqualTo("HTTP DSV without Cache");
        assertThat(existingEntity.entity().description()).isEqualTo("HTTP DSV without Cache");
        assertThat(existingEntity.entity().dataAdapterId()).isEqualTo("5adf24a04b900a0fdb4e52c8");
        assertThat(existingEntity.entity().cacheId()).isEqualTo("5adf24b24b900a0fdb4e52dd");
        assertThat(existingEntity.entity().defaultSingleValue()).isEqualTo("Default single value");
        assertThat(existingEntity.entity().defaultSingleValueType()).isEqualTo(LookupDefaultValue.Type.STRING);
        assertThat(existingEntity.entity().defaultMultiValue()).isEqualTo("Default multi value");
        assertThat(existingEntity.entity().defaultMultiValueType()).isEqualTo(LookupDefaultValue.Type.OBJECT);
    }