void waitUntilTrue(long timeoutMs, Callable<Boolean> callable) throws Exception {
        long timeStart = System.currentTimeMillis();
        while (!callable.call()) {
            if (System.currentTimeMillis() - timeStart >= timeoutMs) {
                throw new RuntimeException("Timeout while waiting for callable to yield true");
            }
            Thread.sleep(10);
        }
    }
Test that waitUntilDone on the session is forwarded to the control handler.
documentapi/src/test/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSessionTestCase.java