         let newIntentDescription = "description for \(newIntentName)"
         let example1 = CreateExample(text: "example 1 for \(newIntentName)")
         let example2 = CreateExample(text: "example 2 for \(newIntentName)")
-        assistant.createIntent(workspaceID: workspaceID, intent: newIntentName, description: newIntentDescription, examples: [example1, example2], failure: failWithError) { intent in
+        assistant.createIntent(workspaceID: workspaceID, intent: newIntentName, description: newIntentDescription, examples: [example1, example2]) {
+            response, error in
+
+            guard let intent = response?.result else {
+                self.failPositiveTest(error)
+                return
+            }
+
             XCTAssertEqual(intent.intentName, newIntentName)
             XCTAssertEqual(intent.description, newIntentDescription)
             expectation.fulfill()

        let expectation2 = self.expectation(description: description2)

        let updatedText = "updated-"+newExample
        assistant.updateCounterexample(workspaceID: workspaceID, text: newExample, newText: updatedText, failure: failWithError) { counterexample in
            XCTAssertEqual(counterexample.text, updatedText)
            expectation2.fulfill()
        }

        let descriptionThree = "Delete the updated value"
        let expectationThree = self.expectation(description: descriptionThree)

        assistant.deleteValue(workspaceID: workspaceID, entity: entityName, value: updatedValueName) {
            _, error in

            guard error == nil else {
                self.failPositiveTest(error)
                return
            }

            expectationThree.fulfill()
        }
        waitForExpectations()
