/**
  * @test
  */
 public function it_should_optimize_http_call_on_rewind()
 {
     $streamName = $this->prepareTestStream(1);
     $iterator = StreamFeedIterator::backward($this->es, $streamName);
     $iterator->rewind();
     $response1 = $this->es->getLastResponse();
     $iterator->rewind();
     $response2 = $this->es->getLastResponse();
     $this->assertSame($response1, $response2);
 }
 /**
  * @param  string             $streamName
  * @return StreamFeedIterator
  */
 public function backwardStreamFeedIterator($streamName)
 {
     return StreamFeedIterator::backward($this, $streamName);
 }
 /**
  * @test
  */
 public function it_can_create_a_backward_iterator()
 {
     $streamName = $this->prepareTestStream(1);
     $this->assertEquals(StreamFeedIterator::backward($this->es, $streamName), $this->es->backwardStreamFeedIterator($streamName));
 }