Adds tests for b0d18c3835ab3ea661dcf71508a812656d67563e (Fixes race condition in case session list is modified during its write into file by CachedMemoryStorage)