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