Introduce expectDeprecation. Remove TESTING_DEPRECATION.