@Test
public void disposeRace() {

    for (int i = 0; i < TestHelper.RACE_DEFAULT_LOOPS; i++) {
        final AtomicInteger count = new AtomicInteger();
        Cancellable c = new Cancellable() {
            @Override
            public void cancel() throws Exception {
                count.getAndIncrement();
            }
        };
        final CancellableDisposable cd = new CancellableDisposable(c);
        Runnable r = new Runnable() {
            @Override
            public void run() {
                cd.dispose();
            }
        };
        TestHelper.race(r, r);
        assertEquals(1, count.get());
    }
}