NotificationExpirationManagement implements RedisExpirationStrategy { static long roundDownMinute(long timeInMs) { Calendar date = Calendar.getInstance(); date.setTimeInMillis(timeInMs); date.clear(Calendar.SECOND); date.clear(Calendar.MILLISECOND); return date.getTimeInMillis(); } NotificationExpirationManagement(RedisFacade redis, RedisSessionRepository redisSession, String namespace,
      String owner, String keyPrefix, boolean sticky); @Override void sessionDeleted(SessionData session); @Override void sessionTouched(SessionData session); @Override void startExpiredSessionsTask(final SessionManager sessionManager); @Override void close(); void reset(); @Override void sessionIdChange(SessionData session);  }
@Test public void testRoundDownMinute() { assertEquals(0L, NotificationExpirationManagement.roundDownMinute(1234L)); assertEquals(0L, NotificationExpirationManagement.roundDownMinute(12345L)); assertEquals(60000L, NotificationExpirationManagement.roundDownMinute(62000L)); }