private function getNextMatchingExpectation($lastFound, ServerRequestInterface $request, Expectation $expectation)
 {
     if ($this->comparator->equals($request, $expectation)) {
         if ($lastFound === null || $expectation->getPriority() > $lastFound->getPriority()) {
             $lastFound = $expectation;
         }
     }
     return $lastFound;
 }
 private function searchForExecutionsCount(Expectation $expectation)
 {
     $count = 0;
     foreach ($this->requestsStorage->listRequests() as $request) {
         if ($this->comparator->equals($request, $expectation)) {
             $count++;
         }
     }
     return $count;
 }