@Test
void getAndRefreshWithRedisDown() {

    // redis shutdown in the middle
    when(redis.hash()).thenReturn(redisHash);
    when(redisHash.getAll(anyString())).thenThrow(new UncheckedIOException(new IOException("unexpected end of stream")));
    assertThatThrownBy(() -> store.getAndRefresh("sessionId", "localhost", Duration.ofMinutes(30)))
            .isInstanceOf(UncheckedIOException.class);
}