async def METHOD_NAME(io_loop, deadline, n, delay, expected):
    f = schedule_future(io_loop, delay=deadline)
    yielded = []
    async with aclosing(iterate_until(f, yield_n(n, delay=delay))) as items:
        async for item in items:
            yielded.append(item)
    assert yielded == expected