Fix test errors generated when testing for deprecated notices