public async Task Then_Gets_Transfer_Accounts_From_AccountApi_And_Maps_To_Model( string accountId, List <TransferConnectionViewModel> apiResponse, [Frozen] Mock <IAccountApiClient> mockAccountApiClient, Infrastructure.Services.EmployerAccountService employerAccountService) { mockAccountApiClient .Setup(client => client.GetTransferConnections(accountId)) .ReturnsAsync(apiResponse); var actual = await employerAccountService.GetTransferConnections(accountId); mockAccountApiClient.Verify(client => client.GetTransferConnections(accountId), Times.Once); actual.Should().BeEquivalentTo(apiResponse.Select(model => new EmployerTransferConnection { FundingEmployerPublicHashedAccountId = model.FundingEmployerPublicHashedAccountId, FundingEmployerAccountName = model.FundingEmployerAccountName, FundingEmployerHashedAccountId = model.FundingEmployerHashedAccountId, FundingEmployerAccountId = model.FundingEmployerAccountId })); }