/**
     * @expectedException \Exception
     * @expectedExceptionMessage Invalid Quickbooks Response, missing QBXMLMsgsRs
     */
    public function testInvalidRequest()
    {
        $xml = <<<XML
<Root/>
XML;
        $delegator = new ResponseDelegator();
        $delegator->getResponseElement($xml);
    }
 /**
  * @param mixed[] $argv
  * @return mixed
  */
 public function handle(array $argv)
 {
     $this->delegator->delegate($argv[0]);
     $total = $this->queue->getMax();
     $remaining = $this->queue->count();
     if ($total && $remaining) {
         $progress = round(($total - $remaining) / $total * 100);
     } else {
         $progress = 100;
     }
     $response = new ReceiveResponseXMLResponse();
     $response->receiveResponseXMLResult = $progress;
     return $response;
 }