         return nil
     }
     
-    func createTestImage(width width: CGFloat, height: CGFloat, color: UIColor = UIColor.greenColor()) -> UIImage {
-        let rect = CGRectMake(0, 0, width, height)
+    func createTestImage(width: CGFloat, height: CGFloat, color: UIColor = UIColor.green) -> UIImage {
+        let rect = CGRect(x: 0, y: 0, width: width, height: height)
         UIGraphicsBeginImageContext(rect.size)
         color.set()
         UIRectFill(rect)
         let testImage = UIGraphicsGetImageFromCurrentImageContext()
         UIGraphicsEndImageContext()
         
-        return testImage
+        return testImage!
     }
 }

        
        // Test show
        APESuperHUD.showOrUpdateHUD(loadingIndicator: .Standard, message: "", presentingView: testView)
        validateShow(testView)
        validateLoadIndicator(testView, informationText: "")
        
        // Test remove
        validateRemove(testView, description: "Completion remove loading indicator")
    }
    
    func testLoadingIndicatorRandomFunnyMessages() {

        let testView = getTestView()
        
        APESuperHUD.showOrUpdateHUD(loadingIndicator: .Standard, message: originalText, presentingView: testView)
        validateShow(view: testView)
        let hudView = getHudView(view: testView)
        hudView?.tapGestureRecognized(sender: "" as AnyObject)
        
        let asyncExpectation = expectation(description: "Delay tap guesture recognized")
        
        DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
            
            // Validate that hud view is removed
            if self.hudViewExists(view: testView) {
                XCTFail("HUD view did not get removed when tapped.")
            }
            
            asyncExpectation.fulfill()
            
        })
        
        self.waitForExpectations(timeout: 8) { error in
            XCTAssertNil(error, "A error while tap view")
        }
    }
