@Test
public void testAverageOfAFewInts() throws Throwable {

    Observable<Integer> src = Observable.from(1, 2, 3, 4, 6);
    average(src).subscribe(w);
    verify(w, times(1)).onNext(anyInt());
    verify(w).onNext(3);
    verify(w, never()).onError(any(Throwable.class));
    verify(w, times(1)).onCompleted();
}