@Override
  public void subscribe(Subscriber<? super T>[] subscribers) {
    if (!validate(subscribers)) {
      return;
    }

    @SuppressWarnings("unchecked")
    Subscriber<? super T>[] newSubscribers = new Subscriber[subscribers.length];
    for (int i = 0; i < subscribers.length; i++) {
      AutoDisposingSubscriberImpl<? super T> subscriber =
          new AutoDisposingSubscriberImpl<>(scope, subscribers[i]);
      newSubscribers[i] = subscriber;
    }
    source.subscribe(newSubscribers);
  }
@Test
  public void autoDispose_withScopeProviderCompleted_shouldNotReportDoubleSubscriptions() {
    TestSubscriber<Object> firstSubscriber = new TestSubscriber<>();
    TestSubscriber<Object> secondSubscriber = new TestSubscriber<>();
    //noinspection unchecked
    Subscriber<Object>[] subscribers = new Subscriber[] {firstSubscriber, secondSubscriber};
    PublishProcessor.create()
        .parallel(DEFAULT_PARALLELISM)
        .to(autoDisposable(ScopeProvider.UNBOUND))
        .subscribe(subscribers);
    firstSubscriber.assertNoValues();
    firstSubscriber.assertNoErrors();
    secondSubscriber.assertNoValues();
    secondSubscriber.assertNoErrors();
    rule.assertNoErrors();
  }