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


  func testStreamIgnoresCompletedFromMutate() {
    RxExpect { test in
      let reactor = CounterReactor()
      reactor.stateForTriggerCompleted = 2
      test.input(reactor.action, [
        next(100),


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