public async Task ProcessPathAsyncUpsertIsSuccessful()
        {
            // Arrange
            const HttpStatusCode upsertResult     = HttpStatusCode.OK;
            const bool           validationResult = true;
            var validLegacyPathModel       = ModelBuilders.ValidLegacyPathModel(ModelBuilders.PathName);
            var validLegacyRegionModels    = ModelBuilders.ValidLegacyRegionModels();
            var validAppRegistrationModels = ModelBuilders.ValidAppRegistrationModels(ModelBuilders.PathName);

            A.CallTo(() => fakeLegacyRegionService.GetListAsync(A <string> .Ignored)).Returns(validLegacyRegionModels);
            A.CallTo(() => fakeDocumentService.GetAsync(A <Expression <Func <AppRegistrationModel, bool> > > .Ignored)).Returns(validAppRegistrationModels);
            A.CallTo(() => fakeModelMappingService.MapModels(A <AppRegistrationModel> .Ignored, A <LegacyPathModel> .Ignored, A <List <LegacyRegionModel> > .Ignored));
            A.CallTo(() => fakeModelValidationService.ValidateModel(A <AppRegistrationModel> .Ignored)).Returns(validationResult);
            A.CallTo(() => fakeDocumentService.UpsertAsync(A <AppRegistrationModel> .Ignored)).Returns(upsertResult);

            // Act
            await legacyDataLoadService.ProcessPathAsync(validLegacyPathModel).ConfigureAwait(false);

            // Assert
            A.CallTo(() => fakeLegacyRegionService.GetListAsync(A <string> .Ignored)).MustHaveHappenedOnceExactly();
            A.CallTo(() => fakeDocumentService.GetAsync(A <Expression <Func <AppRegistrationModel, bool> > > .Ignored)).MustHaveHappenedOnceExactly();
            A.CallTo(() => fakeModelMappingService.MapModels(A <AppRegistrationModel> .Ignored, A <LegacyPathModel> .Ignored, A <List <LegacyRegionModel> > .Ignored)).MustHaveHappenedOnceExactly();
            A.CallTo(() => fakeModelValidationService.ValidateModel(A <AppRegistrationModel> .Ignored)).MustHaveHappenedOnceExactly();
            A.CallTo(() => fakeDocumentService.UpsertAsync(A <AppRegistrationModel> .Ignored)).MustHaveHappenedOnceExactly();
        }
        public async Task ProcessPathAsyncFailsValidation()
        {
            // Arrange
            const bool validationResult           = false;
            var        validLegacyPathModel       = ModelBuilders.ValidLegacyPathModel(ModelBuilders.PathName);
            var        invalidLegacyRegionModels  = A.CollectionOfDummy <LegacyRegionModel>(2);
            var        validAppRegistrationModels = ModelBuilders.ValidAppRegistrationModels(ModelBuilders.PathName);

            A.CallTo(() => fakeLegacyRegionService.GetListAsync(A <string> .Ignored)).Returns(invalidLegacyRegionModels);
            A.CallTo(() => fakeDocumentService.GetAsync(A <Expression <Func <AppRegistrationModel, bool> > > .Ignored)).Returns(validAppRegistrationModels);
            A.CallTo(() => fakeModelMappingService.MapModels(A <AppRegistrationModel> .Ignored, A <LegacyPathModel> .Ignored, A <List <LegacyRegionModel> > .Ignored));
            A.CallTo(() => fakeModelValidationService.ValidateModel(A <AppRegistrationModel> .Ignored)).Returns(validationResult);

            // Act
            await legacyDataLoadService.ProcessPathAsync(validLegacyPathModel).ConfigureAwait(false);

            // Assert
            A.CallTo(() => fakeLegacyRegionService.GetListAsync(A <string> .Ignored)).MustHaveHappenedOnceExactly();
            A.CallTo(() => fakeDocumentService.GetAsync(A <Expression <Func <AppRegistrationModel, bool> > > .Ignored)).MustHaveHappenedOnceExactly();
            A.CallTo(() => fakeModelMappingService.MapModels(A <AppRegistrationModel> .Ignored, A <LegacyPathModel> .Ignored, A <List <LegacyRegionModel> > .Ignored)).MustHaveHappenedOnceExactly();
            A.CallTo(() => fakeModelValidationService.ValidateModel(A <AppRegistrationModel> .Ignored)).MustHaveHappenedOnceExactly();
            A.CallTo(() => fakeDocumentService.UpsertAsync(A <AppRegistrationModel> .Ignored)).MustNotHaveHappened();
        }