public static long nextStartTimestamp(TimeUnit timeUnit, long start) {
        long nextTimestamp = start;
        switch (timeUnit) {
            case MILLISECONDS:
                break;

            case SECONDS:
                nextTimestamp = 1000 + 1000 * (start / 1000); // the next second is the start timestamp.
                break;

            case MINUTES:
                nextTimestamp = 60000 + 60000 * (start / 60000); // next minute is the start timestamp
                break;

            case HOURS:
                nextTimestamp = 3600000 + 3600000 * (start / 3600000); // next hour is the start timestamp
                break;

            case DAYS:
                nextTimestamp = 86400000 + 86400000 * (start / 86400000); // next day is the start timestamp
                break;
        }
        return nextTimestamp;
    }
@Test
    public void testNextMinute() {
        long start = System.currentTimeMillis();
        System.out.println("start = " + start);
        long nextTimestamp = TimeUtil.nextStartTimestamp(TimeUnit.MINUTES, start);
        System.out.println("next minute = " + nextTimestamp);
    }