 
   func testStreamIgnoresErrorFromAction() {
     RxExpect { test in
-      let reactor = CounterReactor()
+      let reactor = test.retain(CounterReactor())
       let action1 = test.scheduler.createHotObservable([
         next(100),
         next(200),


  func testCancel() {
    RxExpect { test in
      let reactor = StopwatchReactor(scheduler: test.scheduler)
      test.input(reactor.action, [
        next(1, .start),
        next(5, .stop),

final class ReactorTests: XCTestCase {
  func testEachMethodsAreInvoked() {
    RxExpect { test in
      let reactor = test.retain(TestReactor())
      test.input(reactor.action, [
        next(100, ["action"]),
      ])
