public void invalidateAll(UUID callerUuid) {
        for (WaitSetEntry entry : queue) {
            if (!entry.isValid()) {
                continue;
            }
            Operation op = entry.getOperation();
            if (callerUuid.equals(op.getCallerUuid())) {
                entry.setValid(false);
            }
        }
    }
@Test
    public void invalidateAll() {
        WaitSet waitSet = newWaitSet();

        UUID uuid = UUID.randomUUID();
        UUID anotherUuid = UUID.randomUUID();

        BlockedOperation op1 = newBlockingOperationWithCallerUuid(uuid);
        waitSet.park(op1);
        BlockedOperation op2 = newBlockingOperationWithCallerUuid(anotherUuid);
        waitSet.park(op2);
        BlockedOperation op3 = newBlockingOperationWithCallerUuid(uuid);
        waitSet.park(op3);

        waitSet.invalidateAll(uuid);

        assertValid(waitSet, op1, false);
        assertValid(waitSet, op2, true);
        assertValid(waitSet, op3, false);
    }