@Test
public void drainMissedRequestedMoreProduced() {

    List<Throwable> errors = TestHelper.trackPluginErrors();
    try {
        SubscriptionArbiter sa = new SubscriptionArbiter();
        sa.getAndIncrement();
        sa.requested = 0;
        sa.missedRequested.set(1);
        sa.missedProduced.set(2);
        sa.drainLoop();
        assertEquals(0, sa.requested);
        TestHelper.assertError(errors, 0, IllegalStateException.class, "More produced than requested: -1");
    } finally {
        RxJavaPlugins.reset();
    }
}