DeferredScalarSubscription extends BasicIntQueueSubscription<T> { @Override public final void clear() { lazySet(FUSED_CONSUMED); value = null; } DeferredScalarSubscription(Subscriber<? super T> actual); @Override final void request(long n); final void complete(T v); @Override final int requestFusion(int mode); @Nullable @Override final T poll(); @Override final boolean isEmpty(); @Override final void clear(); @Override void cancel(); final boolean isCancelled(); final boolean tryCancel();  }
@Test public void clear() { DeferredScalarSubscription<Integer> ds = new DeferredScalarSubscription<Integer>(new TestSubscriber<Integer>()); ds.value = 1; ds.clear(); assertEquals(DeferredScalarSubscription.FUSED_CONSUMED, ds.get()); assertNull(ds.value); }