public void SkipsMissingProfile() { // Arrange Guid profileId = Guid.NewGuid(); AwsProfileRepositoryMock.Setup(x => x.Find(profileId)).Returns((AwsProfile)null); var command = new UpdateBillingData(AwsClientFactory, AwsProfileRepository, BillingManager, Clock, new S3PathParser()); // Act command.LoadDeltas(profileId); // Assert AwsClientFactoryMock.Verify(x => x.GetClient(It.IsAny <AwsProfile>()), Times.Never); }