         XCUIApplication().collectionViews.staticTexts["Sticky header"].tap()
     }
 
-    private func execute(block:() -> Void, until header:XCUIElement, hasHeight expectedHeight:CGFloat) {
+    private func execute(until header:XCUIElement, hasHeight expectedHeight:CGFloat, block:() -> Void) {
         var numberOfSwipes = 0
 
         // Perform the block until the header is the expected height

        XCTAssertEqual(header.frame.height, 250)
        
        let collectionView = XCUIApplication().collectionViews.element(boundBy: 0)
        execute(block: {
            collectionView.swipeUp()
        }, until: header, hasHeight: 64)
    }
    
    func testCollectionViewContentInsetEqualToHeaderHeight() {

        XCTAssertTrue(header.exists)
        
        // Go to the top of the view and make sure that the header is now uncollapsed
        execute(until: header, hasHeight: 250) {
            collectionView.swipeDown()
        }
    }
    
    // MARK: - Utilities
