@Test
public void testSessionTouchedSticky() {

  NotificationExpirationManagement sticky = new NotificationExpirationManagement(redis, redisSession, "test", "this",
      "prefix:", true);
  sticky.sessionTouched(session);
  ArgumentCaptor<byte[]> captureKey = ArgumentCaptor.forClass(byte[].class);
  ArgumentCaptor<byte[]> captureSessionKey = ArgumentCaptor.forClass(byte[].class);
  verify(redis, times(2)).sadd(captureKey.capture(), captureSessionKey.capture());
  ArrayList<String> captured = new ArrayList<>();
  for (byte[] key : captureKey.getAllValues()) {
    captured.add(encode(key));
  }
  assertThat(captured, hasItem("prefix:forced-expirations:120000"));
  verify(redis, times(2)).expireAt(captureKey.capture(), any(long.class));
  captured.clear();
  for (byte[] key : captureSessionKey.getAllValues()) {
    captured.add(encode(key));
  }
  assertThat(captured, hasItem("key:{1}"));
}