public function testTopics()
{
$snippet = $this->snippetFromMethod(PubSubClient::class, 'topics');
$snippet->addLocal('pubsub', $this->client);
$this->connection->listTopics(Argument::any())->shouldBeCalled()->willReturn(['topics' => [['name' => self::TOPIC]]]);
$this->client->setConnection($this->connection->reveal());
$res = $snippet->invoke('topics');
$this->assertInstanceOf(\Generator::class, $res->returnVal());
$this->assertEquals(self::TOPIC, $res->output());
}