ObservableReplay extends ConnectableObservable<T> implements HasUpstreamObservableSource<T>, Disposable { public static <U, R> Observable<R> multicastSelector( final Callable<? extends ConnectableObservable<U>> connectableFactory, final Function<? super Observable<U>, ? extends ObservableSource<R>> selector) { return RxJavaPlugins.onAssembly(new MulticastReplay<R, U>(connectableFactory, selector)); } private  ObservableReplay(ObservableSource<T> onSubscribe, ObservableSource<T> source,
                             final AtomicReference<ReplayObserver<T>> current,
                             final BufferSupplier<T> bufferFactory); static Observable<R> multicastSelector(
            final Callable<? extends ConnectableObservable<U>> connectableFactory,
            final Function<? super Observable<U>, ? extends ObservableSource<R>> selector); static ConnectableObservable<T> observeOn(final ConnectableObservable<T> co, final Scheduler scheduler); @SuppressWarnings("unchecked") static ConnectableObservable<T> createFrom(ObservableSource<? extends T> source); static ConnectableObservable<T> create(ObservableSource<T> source,
            final int bufferSize); static ConnectableObservable<T> create(ObservableSource<T> source,
            long maxAge, TimeUnit unit, Scheduler scheduler); static ConnectableObservable<T> create(ObservableSource<T> source,
            final long maxAge, final TimeUnit unit, final Scheduler scheduler, final int bufferSize); @Override ObservableSource<T> source(); @Override void dispose(); @Override boolean isDisposed(); @Override void connect(Consumer<? super Disposable> connection);  }
@Test public void replaySelectorConnectableReturnsNull() { ObservableReplay.multicastSelector(Functions.justCallable((ConnectableObservable<Integer>)null), Functions.justFunction(Observable.just(1))) .test() .assertFailureAndMessage(NullPointerException.class, "The connectableFactory returned a null ConnectableObservable"); }