### Question:
Upstream { public void clear() { subscription = FlowSupport.NOOP_SUBSCRIPTION; } Upstream(); boolean setOrCancel(Subscription incoming); void request(long n); void cancel(); void clear();  }### Answer:
@Test void clear() { var s = new TestSubscription(); var ups = new Upstream(); assertTrue(ups.setOrCancel(s)); ups.clear(); assertEquals(0, s.cancels); }