NotificationExpirationManagement implements RedisExpirationStrategy { byte[] getSessionExpireKey(String id) { return encode(new StringBuilder(keyExpirePrefix.length() + id.length() + 1).append(keyExpirePrefix).append('{') .append(id).append('}').toString()); } 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 testSessionExpireKeyBuilder() { NotificationExpirationManagement sticky = new NotificationExpirationManagement(redis, redisSession, "test", "this", "prefix:", true); assertArrayEquals(sticky.getSessionExpireKey("10"), sticky.getSessionExpireKey("this", "10")); }