/** @test */
 public function itThrowAnExceptionWhenNoResponseDefinitionIsFound()
 {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('No response definition for GET /foo/{id} is available for status code 200');
     $requestDefinition = new RequestDefinition('GET', 'getFoo', '/foo/{id}', new Parameters([]), ['application/json'], []);
     $requestDefinition->getResponseDefinition(200);
 }
 public function validateResponse(ResponseInterface $response, RequestDefinition $definition)
 {
     $responseDefinition = $definition->getResponseDefinition($response->getStatusCode());
     $contentTypeValid = $this->validateContentType($response, $responseDefinition);
     if ($contentTypeValid) {
         $this->validateMessageBody($response, $responseDefinition);
     }
     $this->validateHeaders($response, $responseDefinition);
 }