public async Task ShouldUpdateExistsingPullRequestsAndNotCreateDuplicates() { var activePullRequests = GeneratePullRequests(5); SetupMultiple(VerifyPredicateForActivePullRequests, activePullRequests); SetupCreateOrUpdate <PullRequest>(); SetupPullRequestsFetch(activePullRequests, Enumerable.Empty <PullRequest>()); SetupIterations(); SetupThreads(); await _handler.Handle(new Vsts.Commands.UpdateActivePullRequests()); RepositoryMock.Verify(r => r.GetAsync <PullRequest>(p => p.State == PullRequestState.Active), Times.Once()); VstsClientFactory.Verify(); PullRequestsClient.Verify(); }