public function testSubscribe()
{
$snippet = $this->snippetFromMethod(Topic::class, 'subscribe');
$snippet->addLocal('topic', $this->topic);
$this->connection->createSubscription(Argument::any())->shouldBeCalled()->willReturn(['name' => self::SUBSCRIPTION]);
$this->topic->setConnection($this->connection->reveal());
$res = $snippet->invoke('subscription');
$this->assertInstanceOf(Subscription::class, $res->returnVal());
}