### Question:
ForwardingSubscriber implements Subscriber<T> { @Override public void onSubscribe(Subscription subscription) { requireNonNull(subscription); if (upstream.setOrCancel(subscription)) { downstream().onSubscribe(subscription); } } protected  ForwardingSubscriber(); @Override void onSubscribe(Subscription subscription); @Override void onNext(T item); @Override void onError(Throwable throwable); @Override void onComplete();  }### Answer:
@Test void callOnSubscribeTwice() { var subscriber = new TestForwardingSubscriber(); var subscription = new Subscription() { int cancels; @Override public void request(long n) {} @Override public void cancel() { cancels++; } }; subscriber.onSubscribe(subscription); subscriber.onSubscribe(subscription); subscriber.onSubscribe(subscription); assertEquals(2, subscription.cancels); }