public async void it_should_create_product() { var id = ProductIdMother.Create(); var name = ProductNameMother.Create(); productRepository.Setup(x => x.Save(It.IsAny <Product>())); await productCreator.Execute(id, name).ConfigureAwait(false); productRepository.Verify(r => r.Save(It.IsAny <Product>()), Times.Once); eventBus.Verify(r => r.Publish(It.IsAny <IEnumerable <DomainEvent> >()), Times.Once); }