Modify the mock to allow testing the retry logic.
Closes #15