@Test
public void debounceSelectorFuncThrows() {

    PublishSubject<Integer> source = PublishSubject.create();
    Func1<Integer, Observable<Integer>> debounceSel = new Func1<Integer, Observable<Integer>>() {
        @Override
        public Observable<Integer> call(Integer t1) {
            throw new OperationReduceTest.CustomException();
        }
    };
    @SuppressWarnings("unchecked")
    Observer<Object> o = mock(Observer.class);
    source.debounce(debounceSel).subscribe(o);
    source.onNext(1);
    verify(o, never()).onNext(any());
    verify(o, never()).onCompleted();
    verify(o).onError(any(OperationReduceTest.CustomException.class));
}