public Task Handle(RealizarPagamentoCommand message) { if (Caos.GerarResultado()) { _bus.Publish(new PagamentoRealizadoEvent { AggregateRoot = message.AggregateRoot }).Wait(); return(Task.CompletedTask); } _bus.Publish(new PagamentoRecusadoEvent { AggregateRoot = message.AggregateRoot }).Wait(); return(Task.CompletedTask); }