long numberOfEvents = eventStore.countStoredEvents();
TestableDomainEvent domainEvent = new TestableDomainEvent(10001, "testDomainEvent");
StoredEvent storedEvent = eventStore.append(domainEvent);
assertTrue(eventStore.countStoredEvents() > numberOfEvents);
assertEquals(numberOfEvents + 1, eventStore.countStoredEvents());
assertNotNull(storedEvent);
TestableDomainEvent reconstitutedDomainEvent = storedEvent.toDomainEvent();
assertNotNull(reconstitutedDomainEvent);
assertEquals(domainEvent.id(), reconstitutedDomainEvent.id());
assertEquals(domainEvent.name(), reconstitutedDomainEvent.name());
assertEquals(domainEvent.occurredOn(), reconstitutedDomainEvent.occurredOn());