@Test
void transformTopologyWithRelationsAndRelationTypes() {

    // region *** build the TopologyTemplate ***
    TTopologyTemplate topology = new TTopologyTemplate();
    topology.addNodeTemplate(nodeTemplates.get("test_node_1"));
    topology.addNodeTemplate(nodeTemplates.get("test_node_2"));
    topology.addNodeTemplate(nodeTemplates.get("test_node_3"));
    topology.addRelationshipTemplate(relationshipTemplates.get("1_hosted_on_3"));
    topology.addRelationshipTemplate(relationshipTemplates.get("2_hosted_on_3"));
    topology.addRelationshipTemplate(relationshipTemplates.get("1_connects_to_2"));
    // endregion
    TServiceTemplate serviceTemplate = new TServiceTemplate();
    serviceTemplate.setTopologyTemplate(topology);
    EdmmConverter edmmConverter = new EdmmConverter(nodeTypes, relationshipTypes, nodeTypeImplementations,
        relationshipTypeImplementations, artifactTemplates, edmmTypeExtendsMapping, edmm1to1Mapping);
    EntityGraph transform = edmmConverter.transform(serviceTemplate);
    assertNotNull(transform);
    assertEquals(42, transform.vertexSet().size());
    assertTrue(transform.vertexSet().stream().anyMatch(entity ->
        entity instanceof ScalarEntity
            && entity.getName().equals("hosted_on")
            && ((ScalarEntity) entity).getValue().equals("test_node_3")
            && entity.getParent().isPresent()
            && entity.getParent().get().getName().equals("relations")
    ));
    assertTrue(transform.vertexSet().stream().anyMatch(entity ->
        entity instanceof ScalarEntity
            && entity.getName().equals("connects_to")
            && ((ScalarEntity) entity).getValue().equals("test_node_2")
            && entity.getParent().isPresent()
            && entity.getParent().get().getName().equals("relations")
    ));
}