     URLRequest(forTestWithMethod: "GET", route: "ping", authToken: self.accessToken)
       .sendForTesting { data in
 
-        let pingResult = String(data: data, encoding: String.Encoding.utf8)!
-        XCTAssertTrue(pingResult.contains("Hello World"))
+        let pingResult = String(data: data, encoding: String.Encoding.utf8)
+        XCTAssertNotNil(pingResult, "pingResult string is nil, data couldn't be decoded.")
+        XCTAssertTrue(pingResult!.contains("Hello World"))
         pingExpectation.fulfill()
     }
     waitForExpectations(timeout: 10.0, handler: nil)

    XCTAssertEqual(user["type"].stringValue, "user")

    let tags = image["tags"].arrayValue
    XCTAssertEqual(tags.first!["confidence"].intValue, 89)
    XCTAssertEqual(tags.first!["label"].stringValue, "road")
    XCTAssertEqual(tags.last!["confidence"].intValue, 50)
    XCTAssertEqual(tags.last!["label"].stringValue, "mountain")

    let location = image["location"]
    XCTAssertEqual(location["latitude"].stringValue, "34.53")


    let pushExpectation = expectation(description: "Sends a push notification to a User.")

    let url = URL(string: "http://127.0.0.1:8090/push/images/2010")
    XCTAssertNotNil(url, "Push notification URL for image 2010 is nil.")
    var request = URLRequest(url: url!)
    request.httpMethod = "POST"
    request.addValue("application/json", forHTTPHeaderField: "Content-Type")
    request.addValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
