public function testResponseCanBeCreatedFromResult()
 {
     $key = 'key';
     $value = 'value';
     $response = Job::fromResult(array($key => $value));
     $this->assertInstanceOf(Job::CLASS, $response);
     $this->assertEquals($value, $response->getResult($key));
 }
 /**
  * @param Job|array $job
  * @return Job
  */
 protected function getJobResponse($job)
 {
     if (is_array($job)) {
         $job = Job::fromResult($job);
     } elseif (!$job instanceof Job) {
         throw new Exception\RuntimeException('Invalid response; expected array or Detail\\FileConversion\\Client\\Response\\Job object');
     }
     return $job;
 }