Can't subscribe on a RxJava 2 Observable with TestSubscriber

It is because *Subscriber are meant for Flowable while Observable uses the *Observer classes. This is because the reactive-streams standard reserves Subscriber for the fully compliant Publisher interface which Flowable implements.

Additionally with RxJava2 all reactive classes have a .test() method which will directly give you the appropriate testing object.


For RxJava 1 → RxJava 2 migration, I've just replaced TestSubscriber with TestObserver to make Observable#subscribe call compile and work.