/**
  * @return \Closure
  */
 protected function createZoneCalculatorsNormalizer()
 {
     return function (Options $options, $calculators) {
         $normalized = [];
         foreach ($calculators as $calculator) {
             if (!$calculator instanceof ZoneCalculator) {
                 $calculator = new ZoneCalculator($calculator);
             }
             $normalized[$calculator->getName()] = $calculator;
         }
         return $normalized;
     };
 }
 /**
  * @dataProvider provideCalculateException
  */
 public function testGetPriceException($exceptionClass, $exceptionMessage, $weight)
 {
     $this->setExpectedException($exceptionClass, $exceptionMessage);
     $this->zoneCalculator->calculate($weight);
 }