@Test
public void getClassesAndInterfacesReferencedForSubEvents() throws Exception {

	TeamAppsDtoModel model = createModel("interface I { subevent i(int i); }"
			+ "class M { subevent m(int m); }"
			+ "class N extends M { subevent n(int n); }"
			+ "class A { event x(String a1, subevent<M> a2); }"
			+ "class B { event y(String b1, subevent<M> b2); }");
	List<ParserRuleContext> result = model.getClassesAndInterfacesReferencedForSubEvents();
	Assertions.assertThat(result).extracting(parserRuleContext -> {
		if (parserRuleContext instanceof TeamAppsDtoParser.ClassDeclarationContext) {
			return ((TeamAppsDtoParser.ClassDeclarationContext) parserRuleContext).Identifier().getText();
		} else {
			return ((TeamAppsDtoParser.InterfaceDeclarationContext) parserRuleContext).Identifier().getText();
		}
	}).containsExactly("M");
}