public static SlidingWindows ofTimeDifferenceAndGrace(final Duration timeDifference, final Duration afterWindowEnd) throws IllegalArgumentException {
        final String timeDifferenceMsgPrefix = prepareMillisCheckFailMsgPrefix(timeDifference, "timeDifference");
        final long timeDifferenceMs = validateMillisecondDuration(timeDifference, timeDifferenceMsgPrefix);
        final String afterWindowEndMsgPrefix = prepareMillisCheckFailMsgPrefix(afterWindowEnd, "afterWindowEnd");
        final long afterWindowEndMs = validateMillisecondDuration(afterWindowEnd, afterWindowEndMsgPrefix);

        return new SlidingWindows(timeDifferenceMs, afterWindowEndMs);
    }
@Test
    public void equalsAndHashcodeShouldNotBeEqualForDifferentGracePeriod() {
        final long timeDifference = 1L + (long) (Math.random() * (10L - 1L));
        final long graceOne = 1L + (long) (Math.random() * (10L - 1L));
        final long graceTwo = 21L + (long) (Math.random() * (41L - 21L));
        verifyInEquality(
                SlidingWindows.ofTimeDifferenceAndGrace(ofMillis(timeDifference), ofMillis(graceOne)),
                SlidingWindows.ofTimeDifferenceAndGrace(ofMillis(timeDifference), ofMillis(graceTwo))
        );
    }