public void Clone()
        {
            var sessionId = Guid.NewGuid().ToString();

            var identity = new UmbracoBackOfficeIdentity(
                1234, "testing", "hello world", new[] { 654 }, new[] { 654 }, "en-us", sessionId, sessionId, new[] { "content", "media" }, new[] { "admin" });

            var cloned = identity.Clone();

            Assert.AreEqual(10, cloned.Claims.Count());
        }
        public void Clone()
        {
            var sessionId = Guid.NewGuid().ToString();
            var userData  = new UserData(sessionId)
            {
                AllowedApplications = new[] { "content", "media" },
                Culture             = "en-us",
                Id              = 1234,
                RealName        = "hello world",
                Roles           = new[] { "admin" },
                StartMediaNodes = new [] { 654 },
                Username        = "******"
            };

            var ticket = new FormsAuthenticationTicket(1, userData.Username, DateTime.Now, DateTime.Now.AddDays(1), true,
                                                       JsonConvert.SerializeObject(userData));

            var identity = new UmbracoBackOfficeIdentity(ticket);

            var cloned = identity.Clone();

            Assert.AreEqual(12, cloned.Claims.Count());
        }