@Test
    void testRegulateIncreaseJumpsToMaxWhenCurrentLimitExceedsThreshold() {
        // Setup history with mean 100 MB/s
        EvictingQueue<Double> queue = getSuccessRateQueue();
        for (int i = 0; i < 4; i++) {
            queue.add((double) mbpsToBps(100.0));
        }
        for (int i = 0; i < 60; i++) {
            queue.add((double) mbpsToBps(50.0));
        }
        // Current rate is 701 MB/s (exceeds 7x history rate)
        when(rateLimiter.currentRate()).thenReturn(mbpsToBps(701.0));
        when(successMonitor.getRateAndReset()).thenReturn(0.0);
        when(failureMonitor.getRateAndReset()).thenReturn(0.0);
        regulator.regulate();
        // Verify rate jumps to MAX
        verify(rateLimiter).update(MAX_RATE_LIMITER_RATE);
        verify(volumeLimiter).update(MAX_RATE_LIMITER_RATE * getWindowSize());
    }
Converts a rate given in KB/s to bytes/s.
s3stream/src/test/java/com/automq/stream/s3/operator/TrafficRegulatorTest.java