@Test
void transformTopology() {

    // 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.addNodeTemplate(nodeTemplates.get("test_node_4"));
    topology.addRelationshipTemplate(relationshipTemplates.get("1_hosted_on_3"));
    topology.addRelationshipTemplate(relationshipTemplates.get("2_hosted_on_3"));
    topology.addRelationshipTemplate(relationshipTemplates.get("4_hosted_on_1"));
    topology.addRelationshipTemplate(relationshipTemplates.get("1_connects_to_2"));
    TServiceTemplate serviceTemplate = new TServiceTemplate();
    serviceTemplate.setTopologyTemplate(topology);
    // endregion
    EdmmConverter edmmConverter = new EdmmConverter(nodeTypes, relationshipTypes, nodeTypeImplementations,
        relationshipTypeImplementations, artifactTemplates, edmmTypeExtendsMapping, edmm1to1Mapping, false);
    EntityGraph transform = edmmConverter.transform(serviceTemplate);
    StringWriter stringWriter = new StringWriter();
    transform.generateYamlOutput(stringWriter);
    assertEquals("---\n" +
        "components:\n" +
        "  test_node_1:\n" +
        "    type: software_component\n" +
        "    relations:\n" +
        "    - hosted_on: test_node_3\n" +
        "    - connects_to: test_node_2\n" +
        "    artifacts:\n" +
        "    - war: /artifacttemplates/https%3A%2F%2Fex.org%2Ftosca%2Fto%2Fedmm/startTestNode4/files/script.sh\n" +
        "  test_node_3:\n" +
        "    type: https_ex.orgtoscatoedmm__test_node_type_3\n" +
        "    properties:\n" +
        "      public_key: '-----BEGIN PUBLIC KEY----- ... -----END PUBLIC KEY-----'\n" +
        "      ssh_port: '22'\n" +
        "      os_family: ubuntu\n" +
        "  test_node_2:\n" +
        "    type: https_ex.orgtoscatoedmm__test_node_type_2\n" +
        "    relations:\n" +
        "    - hosted_on: test_node_3\n" +
        "  test_node_4:\n" +
        "    operations:\n" +
        "      stop: /artifacttemplates/https%3A%2F%2Fex.org%2Ftosca%2Fto%2Fedmm/startTestNode4/files/script.sh\n" +
        "      start: /artifacttemplates/https%3A%2F%2Fex.org%2Ftosca%2Fto%2Fedmm/startTestNode4/files/script.sh\n" +
        "    type: https_ex.orgtoscatoedmm__test_node_type_4\n" +
        "    relations:\n" +
        "    - hosted_on: test_node_1\n" +
        "relation_types:\n" +
        "  depends_on:\n" +
        "    extends: null\n" +
        "  hosted_on:\n" +
        "    extends: depends_on\n" +
        "  connects_to:\n" +
        "    extends: depends_on\n" +
        "component_types:\n" +
        "  https_ex.orgtoscatoedmm__test_node_type_2:\n" +
        "    extends: software_component\n" +
        "  compute:\n" +
        "    extends: base\n" +
        "  https_ex.orgtoscatoedmm__test_node_type_3:\n" +
        "    extends: compute\n" +
        "    properties:\n" +
        "      public_key:\n" +
        "        type: string\n" +
        "      ssh_port:\n" +
        "        type: number\n" +
        "      os_family:\n" +
        "        type: string\n" +
        "  web_application:\n" +
        "    extends: base\n" +
        "  https_ex.orgtoscatoedmm__test_node_type_4:\n" +
        "    extends: web_application\n" +
        "  software_component:\n" +
        "    extends: base\n", stringWriter.toString());
}