@Test
public void testFindAncestorOfType() throws Exception {

	TeamAppsDtoModel model = createModel("interface I { subevent i(int i); }");
	TeamAppsDtoParser.SubEventDeclarationContext subEvent = model.getSubEventDeclarations().get(0);
	TeamAppsDtoParser.InterfaceDeclarationContext result = model.findAncestorOfType(subEvent, TeamAppsDtoParser.InterfaceDeclarationContext.class);
	assertEquals("I", result.Identifier().getText());
}