### Question:
SequentialSubscription implements Subscription, Cancellable { @Override public void cancel() { final Subscription currSubscription = subscription; final long currSourceRequested = sourceRequestedUpdater.getAndSet(this, CANCELLED); if (currSourceRequested >= 0) { currSubscription.cancel(); } } SequentialSubscription();   SequentialSubscription(Subscription delegate); @Override void request(long n); @Override void cancel();  }### Answer:
@Test public void testCancel() { s.cancel(); verify(s1).cancel(); verifyNoMoreInteractions(s1); s.switchTo(s2); verify(s2).cancel(); verifyNoMoreInteractions(s2); }