// IErlElement getAncestorOfKind(Kind kind);
@Test
public void getAncestorOfKind() throws Exception {
module.open(null);
final IErlElement element = module.getElementAtLine(3);
final IErlElement ancestor = element.getAncestorOfKind(ErlElementKind.FUNCTION);
final IErlElement ancestor2 = element.getAncestorOfKind(ErlElementKind.MODULE);
final IErlElement ancestor3 = element.getAncestorOfKind(ErlElementKind.FOLDER);
final IErlElement ancestor4 = element.getAncestorOfKind(ErlElementKind.PROJECT);
final IErlElement ancestor5 = element.getAncestorOfKind(ErlElementKind.MODEL);
final IErlElement ancestor6 = element.getAncestorOfKind(ErlElementKind.TYPESPEC);
assertNotNull(ancestor);
assertTrue(ancestor instanceof IErlFunction);
assertEquals(ErlElementKind.FUNCTION, ancestor.getKind());
assertEquals(element, ancestor);
assertEquals(ErlElementKind.MODULE, ancestor2.getKind());