Added the deprecation message parameters and the unit test. Re #6854.