private function remoteAppRespondsAnException() { $this->response->shouldReceive('getBody')->andReturn($this->domainExceptionResponse); $this->clientException->shouldReceive('getResponse')->andReturn($this->response); $this->client->shouldReceive('request')->andThrow($this->clientException); }