public function testGetsDatasetsWithToken()
{
$this->connection->listDatasets(Argument::any())->willReturn(['nextPageToken' => 'token', 'datasets' => [['datasetReference' => ['datasetId' => 'someOtherdatasetId']]]], ['datasets' => [['datasetReference' => ['datasetId' => $this->datasetId]]]])->shouldBeCalledTimes(2);
$this->client->setConnection($this->connection->reveal());
$dataset = iterator_to_array($this->client->datasets());
$this->assertEquals($this->datasetId, $dataset[1]->id());
}