public function testBackoffCalculateDelay()
 {
     $this->assertEquals(0, RetryMiddleware::exponentialDelay(0));
     $this->assertEquals(1, RetryMiddleware::exponentialDelay(1));
     $this->assertEquals(2, RetryMiddleware::exponentialDelay(2));
     $this->assertEquals(4, RetryMiddleware::exponentialDelay(3));
     $this->assertEquals(8, RetryMiddleware::exponentialDelay(4));
 }
 public function __construct(callable $nextHandler)
 {
     $decider = $this->deciderFn();
     $delay = null;
     parent::__construct($decider, $nextHandler, $delay);
 }