@VisibleForTesting
    public static boolean checkReadyToBeDropped(long tabletId, long backendId) {
        Long time = TABLET_TO_DROP_TIME.get(tabletId, backendId);
        long currentTimeMs = System.currentTimeMillis();
        if (time == null) {
            TABLET_TO_DROP_TIME.put(tabletId, backendId,
                    currentTimeMs + Config.tablet_report_drop_tablet_delay_sec * 1000);
        } else {
            boolean ready = currentTimeMs > time;
            if (ready) {
                // clean the map
                TABLET_TO_DROP_TIME.remove(tabletId, backendId);
                return true;
            }
        }

        return false;
    }
@Test
    public void testTabletDropDelay() throws InterruptedException {
        long tabletId = 100001;
        long backendId = 100002;
        Config.tablet_report_drop_tablet_delay_sec = 3;

        boolean ready = ReportHandler.checkReadyToBeDropped(tabletId, backendId);
        Assert.assertFalse(ready);

        Thread.sleep(1000);
        ready = ReportHandler.checkReadyToBeDropped(tabletId, backendId);
        Assert.assertFalse(ready);

        Thread.sleep(3000);
        ready = ReportHandler.checkReadyToBeDropped(tabletId, backendId);
        Assert.assertTrue(ready);

        // check map is cleaned
        ready = ReportHandler.checkReadyToBeDropped(tabletId, backendId);
        Assert.assertFalse(ready);

        Thread.sleep(4000);
        ready = ReportHandler.checkReadyToBeDropped(tabletId, backendId);
        Assert.assertTrue(ready);
    }