private void ValidateResetCommand(bool allFieldsVisible)
        {
            var viewModel = new DetailedItemViewModel(_story);

            viewModel.InitializeAsync().Wait();

            Assert.IsTrue(viewModel.OnlyDefaultFieldsAreShown, "Only default fields should be visible when detailed item is initialized");

            foreach (var field in viewModel.FilteredEntityFields)
            {
                field.IsSelected = allFieldsVisible;
                viewModel.ToggleEntityFieldVisibilityCommand.Execute(null);
            }

            Assert.IsFalse(viewModel.OnlyDefaultFieldsAreShown, "Visible fields should be different than default fields");

            viewModel.ResetFieldsCustomizationCommand.Execute(null);

            var dynamicFieldsCache = ExposedClass.From(typeof(FieldsCache));
            var cache = dynamicFieldsCache._defaultFieldsCache as FieldsCache.Metadata;

            var persistedVisibleFields = cache.data[Utility.GetConcreteEntityType(_story)];

            Assert.AreEqual(persistedVisibleFields.Count, viewModel.VisibleFields.Count(), "Inconsistent number of visible fields");
            foreach (var field in viewModel.VisibleFields)
            {
                Assert.IsTrue(persistedVisibleFields.Contains(field.Name), $"Field {field.Name} should be visible");
            }

            Assert.IsTrue(viewModel.OnlyDefaultFieldsAreShown, "Only default fields should be visible after reset command");
        }