public function testError()
 {
     try {
         $this->sc->serviceDocument($this->references->getReference('journal'));
     } catch (Exception $ex) {
         $this->assertStringStartsWith('Client error response', $ex->getMessage());
         return;
     }
     $this->fail('no exception.');
 }
 public function setUp()
 {
     parent::setUp();
     $this->sc = $this->getContainer()->get('swordclient');
     $client = new Client();
     $this->history = new History();
     $client->getEmitter()->attach($this->history);
     $mock = new Mock([new Response(200, array('X-Mock' => 'abcpdq'), $this->getResponseBody())]);
     $client->getEmitter()->attach($mock);
     $this->sc->setClient($client);
     $this->sc->serviceDocument($this->references->getReference('journal'));
 }