MaybeSwitchIfEmptySingle extends Single<T> implements HasUpstreamMaybeSource<T> { @Override public MaybeSource<T> source() { return source; } MaybeSwitchIfEmptySingle(MaybeSource<T> source, SingleSource<? extends T> other); @Override MaybeSource<T> source();  }
@SuppressWarnings("rawtypes") @Test public void source() { assertSame(Maybe.empty(), ((HasUpstreamMaybeSource)(Maybe.<Integer>empty().switchIfEmpty(Single.just(1)))).source() ); }