@Test
public void testEmptyAverage() throws Throwable {

    Observable<Integer> src = Observable.empty();
    average(src).subscribe(w);
    verify(w, never()).onNext(anyInt());
    verify(w, times(1)).onError(isA(IllegalArgumentException.class));
    verify(w, never()).onCompleted();
}