@Test
public void exception() throws InterruptedException {

    final Flowable<String> flowable = RxRoom.createFlowable(mDatabase, new String[]{"a"},
            new Callable<String>() {
                @Override
                public String call() throws Exception {
                    throw new Exception("i want exception");
                }
            });
    TestSubscriber<String> subscriber = new TestSubscriber<>();
    flowable.subscribe(subscriber);
    drain();
    assertThat(subscriber.errorCount(), CoreMatchers.is(1));
    assertThat(subscriber.errors().get(0).getMessage(), CoreMatchers.is("i want exception"));
}