@Test
public void addRemoveRance() throws Exception {

    for (int i = 0; i < TestHelper.RACE_DEFAULT_LOOPS; i++) {
        final PublishSubject<Integer> ps = PublishSubject.create();
        final TestObserver<Integer> to = ps.test();
        Runnable r1 = new Runnable() {
            @Override
            public void run() {
                ps.subscribe();
            }
        };
        Runnable r2 = new Runnable() {
            @Override
            public void run() {
                to.cancel();
            }
        };
        TestHelper.race(r1, r2);
    }
}