Add test for Exception checks in retries.