         XCTAssertEqual(layer.frame, sut.bounds)
     }
     
-    func testAnimating() {
+    func testAnimationGroup() {
         
         sut.layoutSubviews()
         sut.startAnimating()

        XCTAssertEqual(strokeStartAnimation.toValue as? Int, 1)
        XCTAssertEqual(strokeStartAnimation.timingFunction, CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut))
        
        XCTAssertEqual(rotationAnimation.keyPath, "transform.rotation.z")
        XCTAssertEqual(rotationAnimation.fromValue as? Int, 0)
        XCTAssertEqual(rotationAnimation.toValue as? CGFloat, CGFloat(M_PI * 2.0))
        XCTAssertEqual(rotationAnimation.timingFunction, CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear))
        XCTAssertEqual(rotationAnimation.repeatCount, Float.infinity)
    
        XCTAssertEqual(colorsAnimation.keyPath, "strokeColor")
        XCTAssertEqual(colorsAnimation.duration, CFTimeInterval(duration))
        XCTAssertEqual(colorsAnimation.keyTimes!, [0, 0.5, 1])

        XCTAssertEqual(animationGroup.isRemovedOnCompletion, false)
        XCTAssertEqual(animationGroup.repeatCount, Float.infinity)
        
    }
    
    func testStrokeEndAnimations() {
    
        sut.layoutSubviews()
        sut.startAnimating()
        
        guard let layer = sut.layer.sublayers?.first as? CAShapeLayer,
            let animationGroup = layer.animation(forKey: "loading") as? CAAnimationGroup else {
                XCTAssert(false, "It should have an animationGroup")
                return
        }
        
        guard let animations = animationGroup.animations,
            let strokeEndAnimation = animations[0] as? CABasicAnimation else {
            XCTAssert(false, "It should have animations")
            return
        }
