         toneAnalyzer.defaultHeaders["X-Watson-Test"] = "true"
     }
 
-    /** Fail false negatives. */
-    func failWithError(error: Error) {
-        XCTFail("Positive test failed with error: \(error)")
-    }
-
-    /** Fail false positives. */
-    func failWithResult<T>(result: T) {
-        XCTFail("Negative test returned a result.")
-    }
-
-    /** Fail false positives. */
-    func failWithResult() {
-        XCTFail("Negative test returned a result.")
-    }
-
     /** Wait for expectations. */
     func waitForExpectations(timeout: TimeInterval = 5.0) {
         waitForExpectations(timeout: timeout) { error in


    func testGetToneJSON() {
        let expectation = self.expectation(description: "Get tone.")
        toneAnalyzer.tone(toneInput: ToneInput(text: text), failure: failWithError) {
            toneAnalysis in
            XCTAssertNotNil(toneAnalysis.documentTone.tones)
            XCTAssertGreaterThan(toneAnalysis.documentTone.tones!.count, 0)
            XCTAssertNotNil(toneAnalysis.sentencesTone)


    func testToneChat() {
        let expectation = self.expectation(description: "Tone chat.")
        toneAnalyzer.toneChat(utterances: utterances, acceptLanguage: "en") {
            response, error in
            guard let analyses = response?.result else {
                XCTFail("Positive test failed with error: \(error!)")
                return
            }
            XCTAssert(!analyses.utterancesTone.isEmpty)
            expectation.fulfill()
        }
