@Override
    public Iterator<WaitSetEntry> iterator() {
        return queue.iterator();
    }
@Test
    public void iterator() {
        WaitSet waitSet = newWaitSet();

        BlockedOperation op1 = new BlockedOperation();
        waitSet.park(op1);
        BlockedOperation op2 = new BlockedOperation();
        waitSet.park(op2);
        BlockedOperation op3 = new BlockedOperation();
        waitSet.park(op3);

        Iterator<WaitSetEntry> it = waitSet.iterator();
        assertEquals(op1, it.next().op);
        assertEquals(op2, it.next().op);
        assertEquals(op3, it.next().op);
        assertFalse(it.hasNext());
    }