@Test
public void testSessionTouchedNotNewSessionNeverExpires() {

  NotificationExpirationManagement neverExpires
    = new NotificationExpirationManagement(redis, redisSession, "test", "this", "prefix:", false);
  session = new SessionData("1", 100, 0);
  session.setNew(false);
  neverExpires.sessionTouched(session);
  ArgumentCaptor<byte[]> captureKey = ArgumentCaptor.forClass(byte[].class);
  verify(redis).del(captureKey.capture());
  assertEquals("com.amadeus.session:expire::test:{1}", SafeEncoder.encode(captureKey.getValue()));
  ArgumentCaptor<byte[]> captureKey2 = ArgumentCaptor.forClass(byte[].class);
  verify(redis).persist(captureKey2.capture());
  assertArrayEquals(SafeEncoder.encode("key:{1}"), captureKey2.getValue());
  ArgumentCaptor<byte[]> captureSessionKey = ArgumentCaptor.forClass(byte[].class);
  verify(redis).srem(captureKey.capture(), captureSessionKey.capture());
  assertEquals("prefix:expirations:60000", SafeEncoder.encode(captureKey.getValue()));
  assertEquals("key:{1}", SafeEncoder.encode(captureSessionKey.getValue()));
}