public Instant getEndOfNextNthPeriod(Instant instant, int periods) {
        return innerGetEndOfNextNthPeriod(this, this.periodicityType, instant, periods);
    }
@Test
    public void testVaryingNumberOfHourlyPeriods() {
        RollingCalendar rc = new RollingCalendar("yyyy-MM-dd_HH");

        long MILLIS_IN_HOUR = 3600 * 1000;

        for (int p = 100; p > -100; p--) {
            long now = 1223325293589L; // Mon Oct 06 22:34:53 CEST 2008
            Instant result = rc.getEndOfNextNthPeriod(Instant.ofEpochMilli(now), p);
            long expected = now - (now % (MILLIS_IN_HOUR)) + p * MILLIS_IN_HOUR;
            assertEquals(expected, result.toEpochMilli());
        }
    }