/**
  * Update a service status based on incident status
  * @param IncidentEvent $event
  * @return
  */
 public function updateService(IncidentEvent $event)
 {
     $incident = $event->getIncident();
     $service = $incident->getService();
     $service = $this->serviceStatusUpdater->update($service, $incident);
     $this->em->persist($service);
     $this->em->flush();
 }
 public function testOperationnalService()
 {
     $serviceMock = $this->getService();
     $serviceMock->setStatus(Service::OPERATIONNAL);
     $incidentMock = $this->getIncident(false);
     $serviceStatusUpdater = new ServiceStatusUpdater();
     $service = $serviceStatusUpdater->update(new Service(), $incidentMock);
     $this->assertSame($service->getStatus(), $serviceMock->getStatus());
 }