public function testCanCompleteMultipartUpload()
 {
     $this->prepareTransfer();
     $model = $this->getMockBuilder('Guzzle\\Service\\Resource\\Model')->disableOriginalConstructor()->getMock();
     $command = $this->getMockBuilder('Guzzle\\Service\\Command\\OperationCommand')->disableOriginalConstructor()->getMock();
     $command->expects($this->any())->method('getResult')->will($this->returnValue($model));
     $this->client->expects($this->any())->method('getCommand')->will($this->returnValue($command));
     $this->assertInstanceOf('Guzzle\\Service\\Resource\\Model', $this->callProtectedMethod($this->transfer, 'complete'));
 }
 protected function withHeadObjectThrowingException()
 {
     $this->s3Client->expects($this->once())->method('headObject')->willThrowException(new \Exception());
 }
 public function testCopyFromDFSToDFS()
 {
     $this->s3ClientMock->expects($this->once())->method('copyObject')->will($this->returnValue(new Model()));
     self::assertTrue($this->dfs->copyFromDFSToDFS('var/test/storage/images/a.png', 'var/test/storage/images/b.png'));
 }