public async Task SurveyController_CreateSurvey_EmptySurveyCreated()
        {
            await _fixture.SeedWithUsers();

            await _fixture.SignInAsResearcher();

            var surveyName = "testSurvey";

            var request = new HttpRequestMessage
            {
                Method     = HttpMethod.Get,
                RequestUri = new Uri($"Survey/Create?name={surveyName}", UriKind.Relative)
            };


            await _fixture.HttpClient.SendAsyncWithCookie(request, "login");


            var surveyManager = _fixture.ManagerFactory.CreateSurveyManager();
            var createdSurvey = await surveyManager.GetSurvey("testSurvey");


            Assert.NotNull(createdSurvey);
            Assert.Single(createdSurvey);
            Assert.True(createdSurvey.ContainsKey(surveyName));
            Assert.True(createdSurvey.ContainsValue("{}"));
        }
        public async Task EditorController_ChangeJson_SurveyCorrectlyChanged()
        {
            await _fixture.SeedWithUsers();

            await _fixture.SignInAsResearcher();

            var surveyName1 = "testSurvey1";

            var manager = _fixture.ManagerFactory.CreateSurveyManager();
            await manager.CreateSurvey(surveyName1);

            var newJson     = "{'test': 'test'}";
            var resultModel = new ChangeSurveyModel {
                Json = newJson, Id = surveyName1
            };
            var jsonContent = JsonConvert.SerializeObject(resultModel);

            var request = new HttpRequestMessage
            {
                Method     = HttpMethod.Post,
                RequestUri = new Uri("Editor/changeJson", UriKind.Relative),
                Content    = new StringContent(jsonContent, Encoding.UTF8, "application/json")
            };

            var response = await _fixture.HttpClient.SendAsyncWithCookie(request, "login");

            var content = await response.Content.ReadAsStringAsync();

            var survey = await manager.GetSurvey(surveyName1);

            var surveyString = JsonConvert.SerializeObject(survey);

            Assert.NotNull(survey);
            Assert.Equal("", content);
            Assert.Contains(newJson, surveyString);
        }