Adds tests for retry mechanism.