@Test(timeout = 1000)
public void runnableDisposedAsyncCrash() throws Exception {

    final Scheduler s = Schedulers.single();
    Disposable d = s.scheduleDirect(new Runnable() {
        @Override
        public void run() {
            throw new IllegalStateException();
        }
    });
    while (!d.isDisposed()) {
        Thread.sleep(1);
    }
}