Add unit tests for swift retries.