             XCTAssertNil(content)
             XCTAssertNotNil(error)
             XCTAssertEqual(error?.domain, AlgoliaSearchErrorDomain)
-            XCTAssertEqual(error?.code, StatusCode.InvalidJSONResponse.rawValue)
+            XCTAssertEqual(error?.code, StatusCode.IllFormedResponse.rawValue)
             expectation.fulfill()
         }
         waitForExpectationsWithTimeout(expectationTimeout, handler: nil)

            XCTAssertNil(content)
            XCTAssertNotNil(error)
            XCTAssertEqual(error?.domain, AlgoliaSearchErrorDomain)
            XCTAssertEqual(error?.code, StatusCode.InvalidJSONResponse.rawValue)
            expectation.fulfill()
        }
        waitForExpectationsWithTimeout(expectationTimeout, handler: nil)

            XCTAssertNil(content)
            XCTAssertNotNil(error)
            XCTAssertEqual(error?.domain, AlgoliaSearchErrorDomain)
            XCTAssertEqual(error?.code, StatusCode.IllFormedResponse.rawValue)
            expectation.fulfill()
        }
        waitForExpectationsWithTimeout(expectationTimeout, handler: nil)
