         let expectation = self.expectation(description: description)
 
         let newExample = "swift-sdk-test-counterexample" + UUID().uuidString
-        conversation.createCounterexample(workspaceID: workspaceID, text: newExample, failure: failWithError) { counterexample in
+        conversation.createCounterexample(workspaceID: workspaceID, text: newExample) {
+            response, error in
+
+            if let error = error {
+                XCTFail("Unexpected error response from service: \(error)")
+                return
+            }
+            guard let counterexample = response?.result else {
+                XCTFail("Missing response value")
+                return
+            }
+
             XCTAssertNotNil(counterexample.text)
             expectation.fulfill()
         }

        let createWorkspaceBody = CreateWorkspace(name: workspaceName, description: workspaceDescription, language: workspaceLanguage, intents: [workspaceIntent],
                                                  entities: [workspaceEntity], dialogNodes: [workspaceDialogNode], counterexamples: [workspaceCounterexample],
                                                  metadata: workspaceMetadata)
        conversation.createWorkspace(properties: createWorkspaceBody, failure: failWithError) { workspace in
            XCTAssertEqual(workspace.name, workspaceName)
            XCTAssertEqual(workspace.description, workspaceDescription)
            XCTAssertEqual(workspace.language, workspaceLanguage)

        let expectation = self.expectation(description: description)

        let newExample = "swift-sdk-test-example" + UUID().uuidString
        conversation.createExample(workspaceID: workspaceID, intent: "weather", text: newExample) {
            response, error in

            if let error = error {
                XCTFail("Unexpected error response from service: \(error)")
                return
            }
            guard let example = response?.result else {
                XCTFail("Missing response value")
                return
            }

            XCTAssertEqual(example.exampleText, newExample)
            expectation.fulfill()
        }
