             url: nil,
             text: test_get_text_sentiment_invalid) {
                 
-                (error, sentiment) in
-                
-                let language = sentiment.language
-                
-                XCTAssertEqual(language, "unknown")
-                XCTAssertNil(sentiment.docSentiment)
+                (error, sentimentResponse) in
+                
+                XCTAssertNotNil(sentimentResponse.language)
+                
+                if let language = sentimentResponse.language {
+                    
+                    XCTAssertEqual(language, "unknown")
+                XCTAssertNil(sentimentResponse.docSentiment)
+                    
+                }
                 
                 invalidExpectation.fulfill()
                 

            url: nil,
            text: nil) {
                
                (error, sentiment) in
                
                let language = sentiment.language
                
                XCTAssertEqual(language, "unknown")
                XCTAssertNil(sentiment.docSentiment)
                
                invalidExpectation.fulfill()
                

    
    
    // tests
    // MARK: Entities
    func testHTMLGetEntities() {
        
        let validExpectation = expectationWithDescription("valid")
