I think these changes are unnecessary.

As you see, we return the key and params, and that's enough to do useful tests. In the test, you just need to check that some output value contains the string produced by the mock.