public function testGetsMetricsWithToken()
{
$this->connection->listMetrics(Argument::any())->willReturn(['nextPageToken' => 'token', 'metrics' => [['name' => 'someOtherMetric']]], ['metrics' => [['name' => $this->metricName]]])->shouldBeCalledTimes(2);
$this->client->setConnection($this->connection->reveal());
$metrics = iterator_to_array($this->client->metrics());
$this->assertEquals($this->metricName, $metrics[1]->name());
}