Replace deprecated mock with double

[#55226210]

RSpec issues deprecation warnings on mock and advises to use double.