/**
  * It should throw an exception if getStats is called when an exception has been set.
  *
  * @expectedException RuntimeException
  * @expectedExceptionMessage Cannot retrieve stats when an exception
  */
 public function testGetStatsWithExceptionException()
 {
     $iterations = new IterationCollection($this->subject->reveal(), $this->parameterSet->reveal(), 1, 1, 0);
     $iterations[0]->setResult(new IterationResult(4, null));
     $iterations->computeStats();
     $iterations->setException(new \Exception('Test'));
     $iterations->getStats();
 }