/**
  * @param string $apiRootUrl
  *
  * @return EventClient
  *
  * @throws EventClientFactoryCreateException
  */
 public static function createEventClient($apiRootUrl)
 {
     $httpClient = self::createHttpClient();
     $representProcessor = self::createRepresentProcessor();
     self::addBasicRepresentations($representProcessor);
     $validationResponse = ValidationResponseFactory::createValidation('Event');
     $eventClient = new EventClient($apiRootUrl, $httpClient, $representProcessor, $validationResponse);
     return $eventClient;
 }
 /**
  * set up basic mocks.
  */
 public function setUp()
 {
     parent::setUp();
     $this->representProcessor = new RepresentProcessor();
     $this->eventRepresentation = new EventRepresentation();
     $this->representProcessor->addRepresentation($this->eventRepresentation);
     $this->mockClient = new MockClient();
     $this->pluginClient = new PluginClient($this->mockClient);
     $this->httpMethodsClient = $this->getMockBuilder(HttpMethodsClient::class)->setConstructorArgs([$this->pluginClient, MessageFactoryDiscovery::find()])->enableProxyingToOriginalMethods()->getMock();
     $this->validationResponse = ValidationResponseFactory::createValidation('Event');
     $this->eventClient = new EventClient('https://events.pagerduty.com/generic/2010-04-15', $this->httpMethodsClient, $this->representProcessor, $this->validationResponse);
 }