/**
  * @test
  */
 public function it_is_serializable()
 {
     $id = CommitteeId::generate();
     $memberId = MemberId::generate();
     $event = new MemberLeftCommittee($id, $memberId);
     $this->assertEquals($event, MemberLeftCommittee::deserialize($event->serialize()));
     $this->assertEquals($id, $event->committeeId());
     $this->assertEquals($memberId, $event->memberId());
 }
 public function whenMemberLeftCommittee(MemberLeftCommittee $event)
 {
     $committee = $this->committees->find((string) $event->committeeId());
     $committee = $committee->removeMember($event->memberId());
     $this->committees->save($committee);
 }
 protected function applyMemberLeftCommittee(MemberLeftCommittee $event)
 {
     unset($this->members[array_search($event->memberId(), $this->members)]);
 }