public void TestExpireAfterWriteSet() { CacheBuilder <int, string> cacheBuilder = CacheBuilder <int, string> .NewBuilder(); TimeSpan expireAfterWriteSeconds = TimeSpan.FromSeconds(ThreadLocalRandom.Current.Next()); cacheBuilder.WithExpireAfterAccess(expireAfterWriteSeconds); Assert.AreEqual((long)Math.Round(expireAfterWriteSeconds.TotalMilliseconds), cacheBuilder.ExpireAfterAccessMilliseconds); }