public async Task ThenWillIndexManyReservationAtOnce() { //Arrange var firstReservation = Guid.NewGuid(); var indexedProviderId = 12345u; var accountLegalEntityId = 54321; var reservations = new List <IndexedReservation> { new IndexedReservation { ReservationId = firstReservation, Status = 1, IndexedProviderId = indexedProviderId, AccountLegalEntityId = accountLegalEntityId }, new IndexedReservation { ReservationId = Guid.NewGuid(), Status = 1 } }; //Act await _repository.Add(reservations); //Assert _clientMock.Verify(c => c.CreateMany( ExpectedIndexName, It.Is <IEnumerable <string> >(x => JsonConvert.DeserializeObject <IndexedReservation>( x.Skip(1).First()).ReservationId.Equals(firstReservation) && x.First().Equals(@"{ ""index"":{""_id"":""" + indexedProviderId + "_" + accountLegalEntityId + "_" + firstReservation + @"""} }"))) , Times.Once); }