public void ApplyIncludesReturnsNull()
        {
            // Arrange
            var organizationList    = EntityGenerator.GetOrganizationEntityList(1, PublishingStatusCache);
            var deletedOrganization = organizationList.Where(o => o.PublishingStatusId == DeletedId).FirstOrDefault();
            var id = deletedOrganization.Id;

            var unitOfWork     = unitOfWorkMockSetup.Object;
            var contextManager = new TestContextManager(unitOfWork, unitOfWork);

            var serviceUtilities = new ServiceUtilities(UserIdentification, LockingManager, contextManager, UserOrganizationService,
                                                        VersioningManager, UserInfoService, UserOrganizationChecker);

            translationManagerMockSetup.Setup(t => t.Translate <OrganizationVersioned, VmOpenApiOrganizationSaha>(deletedOrganization))
            .Returns(new VmOpenApiOrganizationSaha());
            var translationManagerMock = translationManagerMockSetup.Object;

            VersioningManagerMock.Setup(s => s.GetVersionId <OrganizationVersioned>(unitOfWork, id, PublishingStatus.Published, true)).Returns(Guid.NewGuid());

            OrganizationRepoMock.Setup(g => g.All()).Returns(organizationList.AsQueryable());

            var service = new DataAccess.Services.OrganizationService(contextManager, translationManagerMock, TranslationManagerVModel, Logger, OrganizationLogic,
                                                                      serviceUtilities, DataUtils, CommonService, AddressService, PublishingStatusCache, LanguageCache,
                                                                      VersioningManager, UserOrganizationChecker, CacheManager.TypesCache);

            // Act
            Action act = () => service.GetOrganizationSahaById(id);

            // Assert
            act.ShouldThrow <Exception>();
        }
        public void RightVersionNotFound()
        {
            // Arrange
            var id               = Guid.NewGuid();
            var unitOfWork       = unitOfWorkMockSetup.Object;
            var contextManager   = new TestContextManager(unitOfWork, unitOfWork);
            var serviceUtilities = new ServiceUtilities(UserIdentification, LockingManager, contextManager, UserOrganizationService,
                                                        VersioningManager, UserInfoService, UserOrganizationChecker);

            var translationManagerMock = translationManagerMockSetup.Object;

            VersioningManagerMock.Setup(s => s.GetVersionId <OrganizationVersioned>(unitOfWork, id, PublishingStatus.Published, true)).Returns((Guid?)null);
            VersioningManagerMock.Setup(s => s.GetVersionId <OrganizationVersioned>(unitOfWork, id, PublishingStatus.Deleted, true)).Returns((Guid?)null);

            var service = new DataAccess.Services.OrganizationService(contextManager, translationManagerMock, TranslationManagerVModel, Logger, OrganizationLogic,
                                                                      serviceUtilities, DataUtils, CommonService, AddressService, PublishingStatusCache, LanguageCache,
                                                                      VersioningManager, UserOrganizationChecker, CacheManager.TypesCache);

            // Act
            var result = service.GetOrganizationSahaById(id);

            // Assert
            result.Should().BeNull();
        }