@Test
public void testEmpty() {

    AbstractOnSubscribe<Integer, Void> aos = new AbstractOnSubscribe<Integer, Void>() {
        @Override
        protected void next(SubscriptionState<Integer, Void> state) {
            state.onCompleted();
        }
    };
    
    @SuppressWarnings("unchecked")
    Observer<Object> o = mock(Observer.class);
    
    aos.toObservable().subscribe(o);
    
    verify(o, never()).onNext(any(Integer.class));
    verify(o, never()).onError(any(Throwable.class));
    verify(o).onCompleted();
}