public function testJobs()
{
$snippet = $this->snippetFromMethod(BigQueryClient::class, 'jobs');
$snippet->addLocal('bigQuery', $this->client);
$this->connection->listJobs(Argument::withEntry('stateFilter', 'done'))->shouldBeCalledTimes(1)->willReturn(['jobs' => [['jobReference' => ['jobId' => 'job']]]]);
$this->client->setConnection($this->connection->reveal());
$res = $snippet->invoke('jobs');
$this->assertInstanceOf(\Generator::class, $res->returnVal());
$this->assertEquals('job', trim($res->output()));
}