@Mapping(target = "root", source = "dataEntityDto")
    public abstract DataEntityLineage mapLineageDto(final DataEntityLineageDto dataEntityLineageDto);
@Test
    void mapLineageDto() {
        final var dto = DataEntityLineageDto.builder()
            .dataEntityDto(
                EASY_RANDOM.nextObject(DataEntityDimensionsDto.class))
            .downstream(generateStreamDto())
            .build();
        final var result = mapper.mapLineageDto(dto);
        assertThat(result.getRoot().getId()).isEqualTo(dto.getDataEntityDto().getDataEntity().getId());
        assertThat(
            result.getDownstream().getNodes().stream().map(DataEntityLineageNode::getId).collect(Collectors.toList()))
            .isEqualTo(dto.getDownstream().nodes().stream().map(node -> node.entity().getDataEntity().getId()).collect(
                Collectors.toList()));
        assertThat(
            result.getDownstream().getNodes().stream().flatMap(i -> i.getGroupIdList().stream()).distinct().collect(
                Collectors.toList()))
            .isEqualTo(
                List.of(dto.getDownstream().groups().stream().findFirst().orElseThrow().getDataEntity().getId()));
        assertThat(result.getDownstream().getEdges().stream().findFirst().map(DataEntityLineageEdge::getSourceId)
            .orElseThrow())
            .isIn(result.getDownstream().getNodes().stream().map(DataEntityLineageNode::getId)
                .collect(Collectors.toList()));
    }