public void StoreDataToContext() { _userContextService.StoreContext("TestUser", new Models.TestContext() { AssertContent = "My-Test-Content" }); _documentSessionFactory.Save(); GetSession(out IDocumentSession documentSession); var contexts = documentSession.Load <User>(_testUserId)?.Contexts; var context = contexts?.OfType <Models.TestContext>().FirstOrDefault(); Assert.AreEqual(context.AssertContent, "My-Test-Content"); }