public async Task Estab_AddOrReplaceEstablishmentAddress() { var nationalities = new List <LookupDto> { new LookupDto { Code = "1", Id = 1, Name = "Nationality 1" }, new LookupDto { Code = "2", Id = 2, Name = "Nationality 2" }, new LookupDto { Code = "3", Id = 3, Name = "Nationality 3" } }; var counties = new List <LookupDto> { new LookupDto { Code = "1", Id = 1, Name = "County 1" }, new LookupDto { Code = "2", Id = 2, Name = "County 2" }, new LookupDto { Code = "3", Id = 3, Name = "County 3" } }; var establishment = new EstablishmentModel { Urn = 5, Name = "test" }; GetMock <IGroupReadService>().Setup(x => x.GetAllByEstablishmentUrnAsync(It.IsAny <int>(), It.IsAny <IPrincipal>())).ReturnsAsync(new[] { new GroupModel { Name = "Group 1", GroupUId = 1000 } }); GetMock <ICachedLookupService>().Setup(c => c.NationalitiesGetAllAsync()).ReturnsAsync(() => nationalities); GetMock <ICachedLookupService>().Setup(c => c.CountiesGetAllAsync()).ReturnsAsync(() => counties); GetMock <IEstablishmentReadService>().Setup(e => e.GetAsync(It.IsAny <int>(), It.IsAny <IPrincipal>())).ReturnsAsync(() => new ServiceResultDto <EstablishmentModel>(establishment)); GetMock <IEstablishmentReadService>().Setup(e => e.GetEditPolicyAsync(It.IsAny <EstablishmentModel>(), It.IsAny <IPrincipal>())).ReturnsAsync(() => new EstablishmentEditPolicyEnvelope { EditPolicy = new EstablishmentDisplayEditPolicy { IEBTDetail = new IEBTDetailDisplayEditPolicy { AccommodationChangedId = true } } }); await ObjectUnderTest.AddOrReplaceEstablishmentAddressAsync(5, "test"); }