@Test
public void error() {

    TestSubscriber<Integer> ts = TestSubscriber.create(0L);
    TestingDeferredScalarSubscriber ds = new TestingDeferredScalarSubscriber(ts);
    ds.setupDownstream();
    ts.assertNoValues();
    ds.onError(new TestException());
    ts.assertNoValues();
    ts.assertError(TestException.class);
    ts.assertNotComplete();
}