@SuppressWarnings("unchecked")
@Test
public void testGetKeysToExpire() {

  Set<byte[]> expected = Collections.singleton(new byte[] { 1 });
  RedisFacade.ResponseFacade<Object> value = mock(RedisFacade.ResponseFacade.class);
  when(value.get()).thenReturn(expected);
  when(redis.transaction(eq(encode("Test")), any(TransactionRunner.class))).thenReturn(value);
  Set<byte[]> result = expiration.getKeysToExpire(encode("Test"));
  assertSame(expected, result);
  verify(redis).transaction(eq(encode("Test")), any(TransactionRunner.class));
}