DefDescriptor<InterfaceDef> descriptor = DefDescriptorImpl.getInstance("test:fakeparser", InterfaceDef.class);
StringSource<InterfaceDef> source = new StringSource<>(descriptor,
"<aura:interface><aura:foo/></aura:interface>", "myID", Format.XML);
InterfaceDef id = parser.parse(descriptor, source);
try {
id.validateDefinition();
fail("Should have thrown AuraException aura:foo isn't a valid child tag for aura:interface");
} catch (InvalidDefinitionException e) {
}
}