static void assertInRange(double lower, double actual, double upper) {
        System.err.printf("%10.4f  <= %10.4f  <= %10.4f\n", lower, actual, upper);
        assertTrue(lower <= actual, actual + " should be not be smaller than " + lower);
        assertTrue(upper >= actual, actual + " should be not be greater than " + upper);
    }
A more realistic test, where throughput gradually flattens with increasing window size, and with more variance in throughput.
messagebus/src/test/java/com/yahoo/messagebus/DynamicThrottlePolicyTest.java