@Test
public void onErrorThrows() {

    List<Throwable> errors = TestHelper.trackPluginErrors();
    try {
        final List<Object> received = new ArrayList<Object>();
        LambdaObserver<Object> o = new LambdaObserver<Object>(new Consumer<Object>() {
            @Override
            public void accept(Object v) throws Exception {
                received.add(v);
            }
        },
        new Consumer<Throwable>() {
            @Override
            public void accept(Throwable e) throws Exception {
                throw new TestException("Inner");
            }
        }, new Action() {
            @Override
            public void run() throws Exception {
                received.add(100);
            }
        }, new Consumer<Disposable>() {
            @Override
            public void accept(Disposable s) throws Exception {
            }
        });
        assertFalse(o.isDisposed());
        Observable.<Integer>error(new TestException("Outer")).subscribe(o);
        assertTrue(received.toString(), received.isEmpty());
        assertTrue(o.isDisposed());
        TestHelper.assertError(errors, 0, CompositeException.class);
        List<Throwable> ce = TestHelper.compositeList(errors.get(0));
        TestHelper.assertError(ce, 0, TestException.class, "Outer");
        TestHelper.assertError(ce, 1, TestException.class, "Inner");
    } finally {
        RxJavaPlugins.reset();
    }
}