         waitForExpectations()
     }
 
+    func testGetTonePlainText() {
+        let expectation = self.expectation(description: "Get tone.")
+        toneAnalyzer.tone(text: text, failure: failWithError) {
+            toneAnalysis in
+            XCTAssertNotNil(toneAnalysis.documentTone.tones)
+            XCTAssertGreaterThan(toneAnalysis.documentTone.tones!.count, 0)
+            XCTAssertNotNil(toneAnalysis.sentencesTone)
+            XCTAssertGreaterThan(toneAnalysis.sentencesTone!.count, 0)
+            for sentenceAnalysis in toneAnalysis.sentencesTone! {
+                XCTAssertNotNil(sentenceAnalysis.tones)
+                XCTAssertGreaterThan(sentenceAnalysis.tones!.count, 0)
+                XCTAssertNil(sentenceAnalysis.toneCategories)
+                XCTAssertNil(sentenceAnalysis.inputFrom)
+                XCTAssertNil(sentenceAnalysis.inputTo)
+            }
+            expectation.fulfill()
+        }
+        waitForExpectations()
+    }
+
+    func testGetToneHTML() {
+        let expectation = self.expectation(description: "Get tone.")
+        let html = "<!DOCTYPE html><html><body><p>\(text)</p></body></html>"
+        toneAnalyzer.tone(html: html, failure: failWithError) {
+            toneAnalysis in
+            XCTAssertNotNil(toneAnalysis.documentTone.tones)
+            XCTAssertGreaterThan(toneAnalysis.documentTone.tones!.count, 0)
+            XCTAssertNotNil(toneAnalysis.sentencesTone)
+            XCTAssertGreaterThan(toneAnalysis.sentencesTone!.count, 0)
+            for sentenceAnalysis in toneAnalysis.sentencesTone! {
+                XCTAssertNotNil(sentenceAnalysis.tones)
+                XCTAssertNil(sentenceAnalysis.toneCategories)
+                XCTAssertNil(sentenceAnalysis.inputFrom)
+                XCTAssertNil(sentenceAnalysis.inputTo)
+            }
+            expectation.fulfill()
+        }
+        waitForExpectations()
+    }
+
     func testGetToneCustom() {
         let expectation = self.expectation(description: "Get tone with custom parameters.")
         toneAnalyzer.tone(
             toneInput: ToneInput(text: text),
-            contentType: "plain/text",
             sentences: false,
             contentLanguage: "en",
             acceptLanguage: "en",


    static var allTests: [(String, (ToneAnalyzerTests) -> () throws -> Void)] {
        return [
            ("testGetTone", testGetTone),
            ("testGetToneCustom", testGetToneCustom),
            ("testToneChat", testToneChat),
            ("testGetToneEmptyString", testGetToneEmptyString),

    func testGetToneEmptyString() {
        let expectation = self.expectation(description: "Get tone with an empty string.")
        let failure = { (error: Error) in expectation.fulfill() }
        toneAnalyzer.tone(toneInput: ToneInput(text: ""), failure: failure, success: failWithResult)
        waitForExpectations()
    }

