       ]
     )
     
-    XCTAssertEqual(
-      SessionTestCase.statesFromEvents {
+    XCTAssert(
+      SessionTestCase
+      .statesFromEvents {
         $0.application(
           UIApplication.shared,
           handleActionWithIdentifier: "x",

      ]
    )
    
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          didFailToRegisterForRemoteNotificationsWithError: ErrorStub(id: "x")
        )
      }.map { $0.deviceToken },
      [.none, .error(ErrorStub(id: "x") as Error)]
    )
    
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          didRegisterForRemoteNotificationsWithDeviceToken: Data()
        )
      }.map { $0.deviceToken },
      [.none, .some(Data())]
    )
    
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          didDecodeRestorableStateWith: CoderStub(id: "x")
        )
      }.map { $0.stateRestoration },
      [.idle, .didDecode(CoderStub(id: "x"))]
    )

    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          willEncodeRestorableStateWith: CoderStub(id: "x")
        )
      }.map { $0.stateRestoration },
      [.idle, .willEncode(CoderStub(id: "x"))]
    )

    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          shouldSaveApplicationState: CoderStub(id: "x")
        )
      }.map { $0.shouldSaveApplicationState },
      [.allowing(true), .considering(CoderStub(id: "x") as NSCoder)]
    )
    
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          shouldRestoreApplicationState: CoderStub(id: "x")
        )
      }.map { $0.shouldRestoreApplicationState },
      [.allowing(true), .considering(CoderStub(id: "x") as NSCoder)]
    )
    
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          willContinueUserActivityWithType: "x"
        )
      }.map { $0.userActivityState },
      [.idle, .willContinue("x")]
    )
    
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          didFailToContinueUserActivityWithType: "x",
          error: ErrorStub(id: "y")
        )
      }.map { $0.userActivityState },
      [.idle, .didFail("x", ErrorStub(id: "y"))]
    )
    
    let activity = NSUserActivity(activityType: "x")
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          didUpdate: activity
        )
      }.map { $0.userActivityState },
      [.idle, .didContinue(activity)]
    )
    
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          continue: activity,
          restorationHandler: { _ in }
        )
      }.map { $0.userActivityState },
      [.idle, .isContinuing(activity)]
    )
    
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.applicationWillResignActive(UIApplication.shared)
        }.map { $0.state },
      [.none(.awaitingLaunch), .will(.resigned)]
    )
    
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          willChangeStatusBarOrientation: .landscapeLeft,
          duration: 0.0
        )
      }.map { $0.statusBarOrientation },
      [.none(.unknown), .will(.landscapeLeft)]
    )
    
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          didChangeStatusBarOrientation: .landscapeLeft
        )
      }.map { $0.statusBarOrientation },
      [.none(.unknown), .did(.landscapeLeft)]
    )
    
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          willChangeStatusBarFrame: CGRect(x: 1, y: 2, width: 3, height: 4)
        )
      }.map { $0.statusBarFrame },
      [.none(.zero), .will(CGRect(x: 1, y: 2, width: 3, height: 4))]
    )

    // Consider adding beginState to -willChange enum option .will(from: to:)
    // Or firing changes for every frame of animation
    
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          didChangeStatusBarFrame: CGRect(x: 1, y: 2, width: 3, height: 4)
        )
      }.map { $0.statusBarFrame },
      [.none(.zero), .did(CGRect(x: 0, y: 0, width: 320, height: 20))]
    )

    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          handleActionWithIdentifier: "x",
          for: UILocalNotification(),
          completionHandler: {}
        )
      }.map { $0.localAction },
      [.idle,
       .progressing(.ios8(.some( "x"), UILocalNotification(), {}))
      ]
    )
    
    XCTAssertEqual(
      SessionTestCase.statesFromEvents {
        $0.application(
          UIApplication.shared,
          handleActionWithIdentifier: "x",

          withResponseInfo: ["y":"z"],
          completionHandler: {}
        )
      }
      .map { $0.localAction }
      ==
      [
        .idle,
        .progressing(
