/**
  * Runs the command-line and returns.
  *
  * @param string $filter
  *
  * @throws DataProviderMissingException
  *
  * @return mixed
  */
 public function run($filter)
 {
     if (!$this->dataProvider instanceof DataProviderInterface) {
         throw new DataProviderMissingException('A data provider such as file or text is missing.');
     }
     $builder = $this->builder;
     $builder->setPrefix($this->cmd)->setArguments(['-M', $filter, $this->dataProvider->getPath()]);
     $process = $builder->getProcess();
     $process->run();
     $result = trim($process->getOutput());
     return $this->mapper->map($result);
 }
 public function testGarbage()
 {
     $this->assertEquals('2rd{,Atz"JWFv4]mZ', $this->mapper->map('2rd{,Atz"JWFv4]mZ'));
 }