private int tryRequests(Chain<Searcher> chain, String id) {
        int allowedCount = 0;
        for (int i = 0; i < requestsToTry; i++) {
            if (executeWasAllowed(chain, id))
                allowedCount++;
        }
        return allowedCount;
    }
Try many requests and return how many was allowed.
This is to avoid testing the exact pattern of request/deny which does not matter
and is determined by floating point arithmetic details when capacity is close to zero.
container-search/src/test/java/com/yahoo/search/searchers/test/RateLimitingSearcherTestCase.java