@Test
public void onNextOnSubscribeCrash() {

    List<Throwable> list = TestHelper.trackPluginErrors();
    try {
        CrashDummy cd = new CrashDummy(true, 1, false, false, false, false);
        SafeSubscriber<Object> so = cd.toSafe();
        so.onNext(1);
        TestHelper.assertError(list, 0, CompositeException.class);
        List<Throwable> ce = TestHelper.compositeList(list.get(0));
        TestHelper.assertError(ce, 0, NullPointerException.class, "Subscription not set!");
        TestHelper.assertError(ce, 1, TestException.class, "onSubscribe()");
    } finally {
        RxJavaPlugins.reset();
    }
}