     static func setCurrentDelegate(_ delegate: PureSwiftDelegate?, to object: ParentObject) {
         return object.delegate = delegate
     }
-}
-
-final class MockPureSwiftDelegate: PureSwiftDelegate {}
+
+    func delegateTestIt(with: Int) {
+        testItObserver.on(.next(with))
+        self.forwardToDelegate()?.delegateTestIt(with: with)
+    }
+
+    deinit {
+        self.testItObserver.on(.completed)
+    }
+}
+
+final class MockPureSwiftDelegate: PureSwiftDelegate {
+    var latestValue: Int?
+
+    func delegateTestIt(with: Int) {
+        latestValue = with
+    }
+}
 
 // }
 

}


protocol PureSwiftDelegate: class {}

class PureSwiftView: ReactiveCompatible {
    weak var delegate: PureSwiftDelegate?
}

extension Reactive where Base: PureSwiftView {
    var proxy: DelegateProxy<PureSwiftView, PureSwiftDelegate> {
        return PureSwiftDelegateProxy.proxy(for: base)
    }
}


        let mock = MockPureSwiftDelegate()
        
        view.delegate = mock

        let proxy = view.rx.proxy
        XCTAssertTrue(view.delegate === proxy)
        XCTAssertTrue(view.rx.proxy.forwardToDelegate() === mock)

        var latestValue: Int? = nil
        _ = view.rx.testIt.subscribe(onNext: {
            latestValue = $0
        })

        XCTAssertEqual(latestValue, nil)
        view.testIt(with: 3)
        XCTAssertEqual(latestValue, 3)
    }
}

