@Test
public void cancelRace() {

    AsyncProcessor<Object> p = AsyncProcessor.create();
    for (int i = 0; i < TestHelper.RACE_DEFAULT_LOOPS; i++) {
        final TestSubscriber<Object> ts1 = p.test();
        final TestSubscriber<Object> ts2 = p.test();
        Runnable r1 = new Runnable() {
            @Override
            public void run() {
                ts1.cancel();
            }
        };
        Runnable r2 = new Runnable() {
            @Override
            public void run() {
                ts2.cancel();
            }
        };
        TestHelper.race(r1, r2);
    }
}