Unit testing of a deprecated function

Glad that solution will work for you!

And for the benefit of future readers, could you please mark a solution?

FAQ: How do I mark a solution?