             XCTAssertNotNil(output)
 
             // verify intents are equal
-            for index in 0..<response.intents.count {
+            for index in 0..<result.intents.count {
                 let intent1 = intents![index]
-                let intent2 = response.intents[index]
+                let intent2 = result.intents[index]
                 XCTAssertEqual(intent1.intent, intent2.intent)
                 XCTAssertEqual(intent1.confidence, intent2.confidence, accuracy: 10E-5)
             }
 
             // verify entities are equal
-            for index in 0..<response.entities.count {
+            for index in 0..<result.entities.count {
                 let entity1 = entities![index]
-                let entity2 = response.entities[index]
+                let entity2 = result.entities[index]
                 XCTAssertEqual(entity1.entity, entity2.entity)
                 XCTAssertEqual(entity1.location[0], entity2.location[0])
                 XCTAssertEqual(entity1.location[1], entity2.location[1])

        let workspaceDescription = "temporary workspace for the swift sdk unit tests"
        let workspaceLanguage = "en"
        let createWorkspaceBody = CreateWorkspace(name: workspaceName, description: workspaceDescription, language: workspaceLanguage)
        assistant.createWorkspace(properties: createWorkspaceBody, failure: failWithError) { workspace in
            XCTAssertEqual(workspace.name, workspaceName)
            XCTAssertEqual(workspace.description, workspaceDescription)
            XCTAssertEqual(workspace.language, workspaceLanguage)

        let createWorkspaceBody = CreateWorkspace(name: workspaceName, description: workspaceDescription, language: workspaceLanguage, intents: [workspaceIntent],
                                                  entities: [workspaceEntity], dialogNodes: [workspaceDialogNode], counterexamples: [workspaceCounterexample],
                                                  metadata: workspaceMetadata)
        assistant.createWorkspace(properties: createWorkspaceBody) {
            response, error in

            guard let workspace = response?.result else {
                self.failPositiveTest(error)
                return
            }

            XCTAssertEqual(workspace.name, workspaceName)
            XCTAssertEqual(workspace.description, workspaceDescription)
            XCTAssertEqual(workspace.language, workspaceLanguage)
