### Question:
AbstractSubscriber implements Consumer<T>, Disposable { @Override public void dispose() { if (!disposed) { disposed = true; release(); } }  @Override void accept(T event); @Override void dispose(); @Override boolean isDisposed();  }### Answer:
@Test public void testDispose() { assertFalse(subscriber.isDisposed()); subscriber.dispose(); assertTrue(subscriber.isDisposed()); verify(subscriber).release(); subscriber.dispose(); verify(subscriber, times(1)).release(); }