public function testDatasets()
{
$snippet = $this->snippetFromMethod(BigQueryClient::class, 'datasets');
$snippet->addLocal('bigQuery', $this->client);
$this->connection->listDatasets(Argument::any())->shouldBeCalledTimes(1)->willReturn(['datasets' => [['datasetReference' => ['datasetId' => 'dataset']]]]);
$this->client->setConnection($this->connection->reveal());
$res = $snippet->invoke('datasets');
$this->assertInstanceOf(\Generator::class, $res->returnVal());
$this->assertEquals('dataset', trim($res->output()));
}