/**
  * {@inheritdoc}
  */
 public function add(TracksEvents $aggregate)
 {
     if (!$aggregate->hasRecordedEvents()) {
         return;
     }
     $recordedEvents = $aggregate->recordedEvents();
     $aggregate->eraseRecordedEvents();
     $envelopeStream = $this->eventWrapper->wrap($aggregate->aggregateId(), $recordedEvents);
     $this->eventStore->commit($envelopeStream);
 }