I open example code BasicRxJavaSample (from this article Room+RxJava) The main thing is there:
@Rule public InstantTaskExecutorRule instantTaskExecutorRule
Sometimes test dependency issues can be an issue of selecting the appropriate build variant, depending on your Gradle configuration. In my case, tests are configured for the debug build variant only.