 
     func testListClassifiers() {
         let expectation = self.expectation(description: "Get classifiers.")
-        naturalLanguageClassifier.listClassifiers(failure: failWithError) { classifiers in
+        naturalLanguageClassifier.listClassifiers() {
+            response, error in
+
+            if let error = error {
+                XCTFail("Unexpected error response from service: \(error)")
+                return
+            }
+            guard let classifiers = response?.result else {
+                XCTFail("Missing response value")
+                return
+            }
+
             XCTAssertGreaterThan(classifiers.classifiers.count, 0)
             expectation.fulfill()
         }

        let text1 = "How hot will it be today?"
        let text2 = "How sunny will it be today?"
        let collection = [ClassifyInput(text: text1), ClassifyInput(text: text2)]
        naturalLanguageClassifier.classifyCollection(classifierID: trainedClassifierId, collection: collection, failure: failWithError) {
            classifications in
            XCTAssertNotNil(classifications.classifierID)
            XCTAssertEqual(classifications.classifierID, self.trainedClassifierId)
            XCTAssertNotNil(classifications.collection)


    func testGetClassifier() {
        let expectation = self.expectation(description: "Get classifier.")
        naturalLanguageClassifier.getClassifier(classifierID: trainedClassifierId) { response, error in

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

            XCTAssertEqual(classifier.name, self.trainedClassifierName)
            expectation.fulfill()
        }
