public boolean waitSlobrok(String pattern, int cnt) {
        for (int i = 0; i < 1000 && !Thread.currentThread().isInterrupted(); ++i) {
            List<Mirror.Entry> res = net.getMirror().lookup(pattern);
            if (res.size() == cnt) {
                return true;
            }
            try { Thread.sleep(10); } catch (InterruptedException e) { /* ignore */ }
        }
        return false;
    }
Waits for a given service pattern to resolve to the given number of hits in the local slobrok.

@param pattern The pattern to lookup.
@param cnt     The number of entries to wait for.
@return True if the expected number of entries was found.
documentapi/src/test/java/com/yahoo/documentapi/messagebus/protocol/test/PolicyTestFrame.java