@Test
public void retrieveTypeHierarchy() {

    Optional<List<Subtypes<TNodeType>>> tNodeTypeSubtypes = SubstitutionUtils.collectTypeHierarchy(nodeTypes, grandFather);
    assertTrue(tNodeTypeSubtypes.isPresent());
    List<Subtypes<TNodeType>> subtypes = tNodeTypeSubtypes.get();
    assertEquals(3, subtypes.size());
    assertTrue(subtypes.removeIf(nodeType -> PARENT.equals(nodeType.getElement().getName())));
    assertTrue(subtypes.removeIf(nodeType -> MOTHER.equals(nodeType.getElement().getName())));
    assertTrue(subtypes.removeIf(nodeType -> AUNT.equals(nodeType.getElement().getName())));
}