@Test
void getAndRefreshWithInvalidRedisData() {

    // session value in redis is invalid
    when(redis.hash()).thenReturn(redisHash);
    when(redisHash.getAll(anyString())).thenThrow(new RedisException("WRONGTYPE Operation against a key holding the wrong kind of value"));
    assertThat(store.getAndRefresh("sessionId", "localhost", Duration.ofMinutes(30))).isNull();
}