Change JUnit test to clojure.test test.

Pulled out the retry policy into its own class.