             switch stateChangeCounter {
             case 0:
                 // Step 0 OpenPageStep
-                XCTAssertTrue(change.newValue == .inProgress(index: 0), "state should be in progress(0), was \(change.newValue)")
+                assertState(change.newValue, StepRunnerState.inProgress(index: 0))
             case 1:
                 // Step 1 ProcessStep - this will call .finish
-                XCTAssertTrue(change.newValue == .inProgress(index: 1), "state should be in progress(1), was \(change.newValue)")
+                assertState(change.newValue, StepRunnerState.inProgress(index: 1))
             case 2:
-                XCTAssertTrue(change.newValue == .success, "state should be success, was \(change.newValue)")
+                assertState(change.newValue, StepRunnerState.success)
                 XCTAssertEqual(stepRunner.model["step1"] as? Int, 123)
                 exp.fulfill()
             default:

        var stateChangeCounter = 0
        stepRunner.state.afterChange.add { change in
            switch stateChangeCounter {
            case 0:
                XCTAssertTrue(change.newValue == .inProgress(index: 0), "state should be inProgress(0)")
            case 1:
                XCTAssertTrue(change.newValue == .inProgress(index: 1), "state should be inProgress(1)")
            case 2:
                XCTAssertTrue(change.newValue == .success, "state should be success, was \(change.newValue)")
            default:
                break
            }

        var stateChangeCounter = 0
        stepRunner.state.afterChange.add { change in
            switch stateChangeCounter {
            case 0...1:
                assertState(change.newValue, StepRunnerState.inProgress(index: stateChangeCounter))
            case 2:
                assertState(change.newValue, StepRunnerState.success)
                exp.fulfill()
            default:
                break
