@Test
public void bufferWithBOSourceThrows() {

    PublishSubject<Integer> source = PublishSubject.create();
    PublishSubject<Integer> boundary = PublishSubject.create();
    @SuppressWarnings("unchecked")
    Observer<Object> o = mock(Observer.class);
    source.buffer(boundary).subscribe(o);
    source.onNext(1);
    source.onError(new OperationReduceTest.CustomException());
    verify(o).onError(any(OperationReduceTest.CustomException.class));
    verify(o, never()).onCompleted();
    verify(o, never()).onNext(any());
}