public function testGetsJobsWithToken()
{
$this->connection->listJobs(Argument::any())->willReturn(['nextPageToken' => 'token', 'jobs' => [['jobReference' => ['jobId' => 'someOtherJobId']]]], ['jobs' => [['jobReference' => ['jobId' => $this->jobId]]]])->shouldBeCalledTimes(2);
$this->client->setConnection($this->connection->reveal());
$job = iterator_to_array($this->client->jobs());
$this->assertEquals($this->jobId, $job[1]->id());
}