public function test_ShouldWaitIfNotReady()
 {
     $waitTime = 5;
     $timeMock2 = $this->getMock(TimeIntervalInterface::class);
     $timeMock2->expects($this->any())->method("isReady")->will($this->returnValue(false));
     $timeMock2->expects($this->any())->method("getWaitingTime")->will($this->returnValue($waitTime));
     /** @var \paslandau\GuzzleRotatingProxySubscriber\Interval\TimeIntervalInterface $timeMock2 */
     $rp = new RotatingProxy("test", null, -1, -1, $timeMock2);
     $this->assertTrue($rp->hasToWait(), "Expected proxy needs to wait");
     $this->assertEquals($waitTime, $rp->getWaitingTime(), "Expected {$waitTime} seconds to wait");
 }