/**
  * Checks the unit systems getter
  */
 public function testUnitSystems()
 {
     $this->assertEquals(UnitSystem::getUnitSystems(), array(UnitSystem::IMPERIAL, UnitSystem::METRIC));
 }
 /**
  * Sets  the directions request unit system
  *
  * @param string $unitSystem
  */
 public function setUnitSystem($unitSystem = null)
 {
     if (in_array($unitSystem, UnitSystem::getUnitSystems()) || is_null($unitSystem)) {
         $this->unitSystem = $unitSystem;
     } else {
         throw new \InvalidArgumentException(sprintf('The directions request unit system can only be : %s', implode(', ', UnitSystem::getUnitSystems())));
     }
 }