@Test
public void onErrorWithoutOnSubscribe() {

    TestObserver<Integer> to = new TestObserver<Integer>();
    SafeObserver<Integer> so = new SafeObserver<Integer>(to);
    so.onError(new TestException());
    to.assertFailure(CompositeException.class);
    TestHelper.assertError(to, 0, TestException.class);
    TestHelper.assertError(to, 1, NullPointerException.class, "Subscription not set!");
}