                     let newRequest = newEndpoint.urlRequest
                     let newEncodedRequest = try? encoding.encode(newRequest!, with: bodyParameters)
 
-                    expect(request?.httpBody).to(equal(newEncodedRequest?.httpBody))
-                    expect(request?.allHTTPHeaderFields).to(equal(newEncodedRequest?.allHTTPHeaderFields))
-                    expect(request?.httpMethod).to(equal(newEncodedRequest?.httpMethod))
+                    expect(request.httpBody).to(equal(newEncodedRequest?.httpBody))
+                    expect(request.allHTTPHeaderFields).to(equal(newEncodedRequest?.allHTTPHeaderFields))
+                    expect(request.httpMethod).to(equal(newEncodedRequest?.httpMethod))
                 }
             }
         }

                }

                it("updated httpBody") {
                    expect(request?.httpBody).to(equal(data))
                }

                it("didn't update any of the other properties") {
                    expect(request?.url?.absoluteString).to(equal(endpoint.url))
                    expect(request?.allHTTPHeaderFields).to(equal(endpoint.httpHeaderFields))
                    expect(request?.httpMethod).to(equal(endpoint.method.rawValue))
                }
            }

            context("when task is .requestParameters") {
                var parameters: [String: Any]!
                var encoding: ParameterEncoding!
                var request: URLRequest?

                beforeEach {
                    parameters = ["Nemesis": "Harvey"]

                var bodyParameters: [String: Any]!
                var urlParameters: [String: Any]!
                var encoding: ParameterEncoding!
                var request: URLRequest!

                beforeEach {
                    bodyParameters = ["Nemesis": "Harvey"]
