Injected a retry loop function into newRegistry.
Actually use the injected function.
Return an error from the retry function.
Fixed a bug.
Fixed a test bug.
Fixed up testing after adding a retry loop to the registry.