@Test
public void disposeRace() {

    for (int i = 0; i < TestHelper.RACE_DEFAULT_LOOPS; i++) {
        CompositeDisposable set = new CompositeDisposable();
        final ScheduledRunnable run = new ScheduledRunnable(Functions.EMPTY_RUNNABLE, set);
        set.add(run);
        Runnable r1 = new Runnable() {
            @Override
            public void run() {
                run.dispose();
            }
        };
        TestHelper.race(r1, r1);
        assertEquals(0, set.size());
    }
}