@Test
public void testEmptyAverageDoubles() throws Throwable {

    Observable<Double> src = Observable.empty();
    averageDoubles(src).subscribe(wd);
    verify(wd, never()).onNext(anyDouble());
    verify(wd, times(1)).onError(isA(IllegalArgumentException.class));
    verify(wd, never()).onCompleted();
}