public boolean isAllowable() {
        long now = System.currentTimeMillis();
        if (now > lastResetTime.get() + interval) {
            token.set(rate);
            lastResetTime.set(now);
        }

        return token.decrementAndGet() >= 0;
    }
@Test
    void testIsAllowable() throws Exception {
        statItem = new StatItem("test", 5, 1000L);
        long lastResetTime = statItem.getLastResetTime();
        assertTrue(statItem.isAllowable());
        Thread.sleep(1100L);
        assertTrue(statItem.isAllowable());
        assertTrue(lastResetTime != statItem.getLastResetTime());
        assertEquals(4, statItem.getToken());
    }