public RequestLimiter(double qpsAllowed) {
        this(new UnaryLeapArray(10, 1000), qpsAllowed);
    }
@Test
    public void testRequestLimiter() {
        try (MockedStatic<TimeUtil> mocked = super.mockTimeUtil()) {
            setCurrentMillis(mocked, System.currentTimeMillis());
            RequestLimiter limiter = new RequestLimiter(10);
            limiter.add(3);
            limiter.add(3);
            limiter.add(3);
            assertTrue(limiter.canPass());
            assertEquals(9, limiter.getSum());
            limiter.add(3);
            assertFalse(limiter.canPass());

            // wait a second to refresh the window
            sleep(mocked, 1000);
            limiter.add(3);
            assertTrue(limiter.tryPass());
            assertTrue(limiter.canPass());
            assertEquals(4, limiter.getSum());
        }
    }