DefDescriptor<EventDef> descriptor = DefDescriptorImpl.getInstance("aura:testevent", EventDef.class);
StringSource<EventDef> source = new StringSource<>(descriptor,
"<aura:event type='component' abstract='true'></aura:event>", "myID", Format.XML);
EventDef ed = parser.parse(descriptor, source);
try {
ed.validateDefinition();
fail("Should have thrown AuraRuntimeException for creating an abstract event");
} catch (Exception e) {
checkExceptionContains(e, InvalidDefinitionException.class,
"Invalid attribute \"abstract\"");
}