@Test
public void drainMaxLoopMissingBackpressure() {

    TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
    ts.onSubscribe(new BooleanSubscription());
    QueueDrain<Integer, Integer> qd = new QueueDrain<Integer, Integer>() {
        @Override
        public boolean cancelled() {
            return false;
        }
        @Override
        public boolean done() {
            return false;
        }
        @Override
        public Throwable error() {
            return null;
        }
        @Override
        public boolean enter() {
            return true;
        }
        @Override
        public long requested() {
            return 0;
        }
        @Override
        public long produced(long n) {
            return 0;
        }
        @Override
        public int leave(int m) {
            return 0;
        }
        @Override
        public boolean accept(Subscriber<? super Integer> a, Integer v) {
            return false;
        }
    };
    SpscArrayQueue<Integer> q = new SpscArrayQueue<Integer>(32);
    q.offer(1);
    QueueDrainHelper.drainMaxLoop(q, ts, false, null, qd);
    ts.assertFailure(MissingBackpressureException.class);
}