         NVActivityIndicatorPresenter.sharedInstance.startAnimating(activityData)
         doAfter(50) {
             XCTAssertFalse(self.checkActivityViewAppeared())
-            NVActivityIndicatorPresenter.sharedInstance.stopAnimating()
+        }
+        NVActivityIndicatorPresenter.sharedInstance.stopAnimating()
+        doAfter(approximateZero) {
+            XCTAssertFalse(self.checkActivityViewAppeared())
         }
 
-        XCTAssertFalse(checkActivityViewAppeared())
         NVActivityIndicatorPresenter.sharedInstance.startAnimating(activityData)
-        doAfter(150) {
+        doAfter(100) {
             XCTAssertTrue(self.checkActivityViewAppeared())
-            NVActivityIndicatorPresenter.sharedInstance.stopAnimating()
+        }
+        NVActivityIndicatorPresenter.sharedInstance.stopAnimating()
+        doAfter(approximateZero) {
             XCTAssertFalse(self.checkActivityViewAppeared())
         }
     }

    func checkActivityViewAppeared() -> Bool {
        for item in UIApplication.shared.keyWindow!.subviews
            where item.restorationIdentifier == "NVActivityIndicatorViewContainer" {
            return true
        }

        return false

            XCTAssertTrue(self.checkActivityViewAppeared())
        }
        NVActivityIndicatorPresenter.sharedInstance.stopAnimating()
        doAfter(50) {
            XCTAssertTrue(self.checkActivityViewAppeared())
        }
        doAfter(50) {
