public async Task Post_RegionIdSpecifiedStoresExpandedSubRegionsInState()
        {
            // Arrange
            var provider = await TestData.CreateProvider(apprenticeshipQAStatus : ApprenticeshipQAStatus.NotStarted);

            await User.AsProviderUser(provider.ProviderId, ProviderType.Apprenticeships);

            var flowModel = new FlowModel();

            flowModel.SetApprenticeshipLocationType(ApprenticeshipLocationType.EmployerBased);
            flowModel.SetApprenticeshipIsNational(false);
            var mptxInstance = CreateMptxInstance(flowModel);

            var requestContent = new FormUrlEncodedContentBuilder()
                                 .Add("RegionIds", "E12000001")
                                 .ToContent();

            // Act
            var response = await HttpClient.PostAsync(
                $"new-apprenticeship-provider/apprenticeship-employer-locations-regions?providerId={provider.ProviderId}&ffiid={mptxInstance.InstanceId}",
                requestContent);

            // Assert
            var regions = await RegionCache.GetAllRegions();

            var region = regions.Single(r => r.Id == "E12000001");
            var state  = GetMptxInstance <FlowModel>(mptxInstance.InstanceId).State;

            Assert.All(region.SubRegions, sr => state.ApprenticeshipLocationSubRegionIds.Contains(sr.Id));
        }
        public async Task Post_NotApprenticeshipProviderReturnsForbidden()
        {
            // Arrange
            var provider = await TestData.CreateProvider(
                apprenticeshipQAStatus : ApprenticeshipQAStatus.NotStarted,
                providerType : ProviderType.FE);

            await User.AsProviderUser(provider.ProviderId, ProviderType.FE);

            var flowModel = new FlowModel();

            flowModel.SetApprenticeshipLocationType(ApprenticeshipLocationType.EmployerBased);
            flowModel.SetApprenticeshipIsNational(false);
            var mptxInstance = CreateMptxInstance(flowModel);

            var regions = await RegionCache.GetAllRegions();

            var subRegion1Id = regions.First().SubRegions.First().Id;
            var subRegion2Id = regions.Skip(1).First().SubRegions.First().Id;

            var requestContent = new FormUrlEncodedContentBuilder()
                                 .Add("RegionIds", subRegion1Id)
                                 .Add("RegionIds", subRegion2Id)
                                 .ToContent();

            // Act
            var response = await HttpClient.PostAsync(
                $"new-apprenticeship-provider/apprenticeship-employer-locations-regions?providerId={provider.ProviderId}&ffiid={mptxInstance.InstanceId}",
                requestContent);

            // Assert
            Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode);
        }