StringSource<?> source = (StringSource<?>) getAuraTestingUtil().getSource(extendsSelf);
String contents = "<aura:theme extends='%s'> </aura:theme>";
source.addOrUpdate(String.format(contents, extendsSelf.getDescriptorName()));
try {
ThemeDef def = extendsSelf.getDef();
def.validateReferences();
fail("A theme should not be able to extend itself.");
} catch (Exception e) {
checkExceptionContains(e, InvalidDefinitionException.class, "cannot extend itself");
}
}