public function testWhenRequestAllDetailsThenGetAllDetails()
 {
     $responses = [$this->response, $this->response];
     $this->requestFactory->shouldReceive('pageRequest')->atLeast(1)->andReturn($this->request);
     $this->client->shouldReceive('send')->with($this->request)->atLeast(1)->andReturn($this->response);
     $this->response->shouldReceive('getHeader')->with(Settings::TOTAL_PAGE_HEADER)->once()->andReturn(self::NB_PAGE);
     $this->response->shouldReceive('json')->atLeast(1)->andReturn([]);
     $this->batchRequestManager->shouldReceive('executeRequests')->once()->andReturn($responses);
     $this->jsonIteratorFactory->shouldReceive('buildJsonFilesIterator');
     $this->consumer->getAll(true);
 }
 protected function convertResponsesToArray(array $responses)
 {
     return $this->jsonIteratorFactory->buildJsonFilesIterator($responses, ['firstTopLevelString' => $this->idString]);
 }