public void AllAppliedEventsForAllAggregateRootsAreExecuted()
{
TestAggregateRoot aggregateRoot1 = new TestAggregateRoot(Guid.NewGuid());
var domainEvent1 = ApplyNewEvent(aggregateRoot1);
var domainEvent2 = ApplyNewEvent(aggregateRoot1);
TestAggregateRoot aggregateRoot2 = new TestAggregateRoot(Guid.NewGuid());
var domainEvent3 = ApplyNewEvent(aggregateRoot2);
var domainEvent4 = ApplyNewEvent(aggregateRoot2);
sut.ApplyChangesAsync(new List<TestAggregateRoot> { aggregateRoot1, aggregateRoot2 }).Wait();
Assert.AreEqual(4, sut.EventBroker.ExecutedEvents.Count);
Assert.IsTrue(sut.EventBroker.ExecutedEvents.Contains(domainEvent1));
Assert.IsTrue(sut.EventBroker.ExecutedEvents.Contains(domainEvent2));
Assert.IsTrue(sut.EventBroker.ExecutedEvents.Contains(domainEvent3));
Assert.IsTrue(sut.EventBroker.ExecutedEvents.Contains(domainEvent4));
}