public void TestDictionarySerialization()
        {
            var accessor = CreateTokenCacheAccessor();

            var s1 = new TokenCacheDictionarySerializer(accessor);

            byte[] bytes = s1.Serialize(null);
            string json  = new UTF8Encoding().GetString(bytes);

            var otherAccessor = new InMemoryTokenCacheAccessor(Substitute.For <ICoreLogger>());
            var s2            = new TokenCacheDictionarySerializer(otherAccessor);

            s2.Deserialize(bytes, false);

            AssertAccessorsAreEqual(accessor, otherAccessor);
        }
        public void TestDictionarySerialization()
        {
            var accessor = CreateTokenCacheAccessor();

            var s1 = new TokenCacheDictionarySerializer(accessor);

            byte[] bytes = s1.Serialize(null);
            string json  = new UTF8Encoding().GetString(bytes);

            // TODO(cache): assert json value?  or look at JObject?

            var otherAccessor = new InMemoryTokenCacheAccessor();
            var s2            = new TokenCacheDictionarySerializer(otherAccessor);

            s2.Deserialize(bytes, false);

            AssertAccessorsAreEqual(accessor, otherAccessor);
        }