public static long oneTimeUnitMillisecond(TimeUnit timeUnit) {
        long millisecond = 0;
        switch (timeUnit) {
            case MILLISECONDS:
                millisecond = 1;
                break;

            case SECONDS:
                millisecond = 1000;
                break;

            case MINUTES:
                millisecond = 60000;
                break;

            case HOURS:
                millisecond = 3600000;
                break;

            case DAYS:
                millisecond = 86400000;
                break;
        }
        return millisecond;
    }
@Test
    public void testTimeUnitToMillisecond() {
        Assert.assertEquals(1000, TimeUtil.oneTimeUnitMillisecond(TimeUnit.SECONDS));
    }