@Test
public void disposeThrows() {

    Disposable d = new Disposable() {
        @Override
        public void dispose() {
            throw new TestException();
        }
        @Override
        public boolean isDisposed() {
            return false;
        }
    };
    ListCompositeDisposable lcd = new ListCompositeDisposable(d, d);
    try {
        lcd.dispose();
        fail("Should have thrown!");
    } catch (CompositeException ex) {
        List<Throwable> list = ex.getExceptions();
        TestHelper.assertError(list, 0, TestException.class);
        TestHelper.assertError(list, 1, TestException.class);
    }
    lcd = new ListCompositeDisposable(d);
    try {
        lcd.dispose();
        fail("Should have thrown!");
    } catch (TestException  ex) {
        // expected
    }
}