RxJava flowable queries @get:Rule var instantTaskExecutorRule = InstantTaskExecutorRule() @Before fun initDb() { database = Room.inMemoryDatabaseBuilder(InstrumentationRegistry.getContext(), UsersDatabase::class.java) // allowing main thread queries, just for testing .allowMainThreadQueries() .build() }