@Test
public void removeNotPresent() {

    final AtomicReference<PublishSubscriber<Integer>> ref = new AtomicReference<PublishSubscriber<Integer>>();
    final ConnectableFlowable<Integer> cf = new Flowable<Integer>() {
        @Override
        @SuppressWarnings("unchecked")
        protected void subscribeActual(Subscriber<? super Integer> s) {
            s.onSubscribe(new BooleanSubscription());
            ref.set((PublishSubscriber<Integer>)s);
        }
    }.publish();
    cf.connect();
    ref.get().add(new InnerSubscriber<Integer>(new TestSubscriber<Integer>()));
    ref.get().remove(null);
}