@Test
public void testAnyWithEmpty() {

    Observable<Integer> w = Observable.empty();
    Observable<Boolean> observable = Observable.create(any(w));
    @SuppressWarnings("unchecked")
    Observer<Boolean> observer = mock(Observer.class);
    observable.subscribe(observer);
    verify(observer, times(1)).onNext(false);
    verify(observer, never()).onNext(true);
    verify(observer, never()).onError(org.mockito.Matchers.any(Throwable.class));
    verify(observer, times(1)).onCompleted();
}