public static long computeStartOfNextMonth(long now) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(new Date(now));

        cal.set(Calendar.DATE, 1);
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);
        cal.add(Calendar.MONTH, 1);
        return cal.getTime().getTime();
    }
@Test
    public void testMonth() {
        // Mon Nov 20 18:05:17 GMT 2006
        long now = 1164045917522L;
        now = correctBasedOnTimeZone(now);
        // Fri Dec 01 00:00:00 GMT 2006
        long expected = 1164931200000L;
        expected = correctBasedOnTimeZone(expected);

        long computed = TimeUtil.computeStartOfNextMonth(now);
        Assertions.assertEquals(expected - now, 1000 * (3600 * (5 + 24 * 10) + 60 * 54 + 42) + 478);
        Assertions.assertEquals(expected, computed);
    }