FAILURE: Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server."
As @Teffi pointed out in the comments I was running the test on a device that did not have access to my localhost server running on my local machine.
As @Teffi pointed out in the comments I was running the test on a device that did not have access to my localhost server running on my local machine.