     
     func testLayoutSubviews_shouldCalculateCorrectFrameForFillView() {
         let view = setupView(frame: CGRect(x: 10, y: 10, width: 100, height: 100))
+        let fillView = view.subviews[fillViewIndex]
         
         let expectedFrame = CGRect(x: 4, y: 4, width: 92, height: 92)
-        expect(view.subviews[2].frame).to(equal(expectedFrame))
+        expect(fillView.frame).to(equal(expectedFrame))
     }
     
     func testLayoutSubviews_shouldRenderFillViewWithRoundedCorners() {
         let view = setupView(frame: CGRect(x: 0, y: 0, width: 100, height: 10))
+        let fillView = view.subviews[fillViewIndex]
         
         let expectedRoundedCorners: CGFloat = 0.7
-        expect(view.subviews[2].layer.cornerRadius).to(beCloseTo(expectedRoundedCorners, within: 0.01))
+        expect(fillView.layer.cornerRadius).to(beCloseTo(expectedRoundedCorners, within: 0.01))
     }
     
     func testLayoutSubviews_shouldRenderFillViewWithDefaultFillColor() {

    
    func testLayoutSubviews_shouldSetBackgroundViewFrameToSameSizeAsTheParent() {
        let view = setupView(frame: CGRect(x: 10, y: 10, width: 100, height: 100))
        
        let expectedFrame = CGRect(x: 0, y: 0, width: 100, height: 100)
        expect(view.subviews[1].frame).to(equal(expectedFrame))
    }
    
    func testLayoutSubviews_shouldRenderBackgroundViewWithDefaultBorder() {

import GTProgressBar

class GTProgressBarTests: XCTestCase {
    private let backgroundViewIndex = 1
    private let fillViewIndex = 2
    
    func testInitWithFrame_shouldCreateAllSubviews() {
        let view = GTProgressBar(frame: CGRect.zero)
