public function testCreateClaimCheck()
 {
     $sut = new ClaimCheckFactory($expected = 'MyBucket');
     $actual = $sut->create();
     self::assertEquals($expected, $actual->getS3BucketName());
     self::assertNotEmpty($actual->getS3Key());
 }
 public function testReceiveAlteredReceiptHandle()
 {
     $this->sqsClient->method('__call')->with('receiveMessage')->willReturnCallback(function ($name, array $args) {
         $factory = new ClaimCheckFactory('MyBucket');
         $serializer = new ClaimCheckJsonSerializer();
         return new Result(['Messages' => [['Body' => $serializer->serialize($factory->create('MyKey')), 'ReceiptHandle' => 'MyReceiptHandle']]]);
     });
     $this->s3Client->method('__call')->with('getObject')->willReturnCallback(function ($name, array $args) {
         return new Result(['Body' => 'MyOriginalMessage']);
     });
     $actual = $this->sut->receiveMessage();
     self::assertInstanceOf(Result::class, $actual);
     self::assertContains('MyReceiptHandle', $actual->search('Messages[].ReceiptHandle|[0]'));
     self::assertContains('MyBucket', $actual->search('Messages[].ReceiptHandle|[0]'));
     self::assertContains('MyKey', $actual->search('Messages[].ReceiptHandle|[0]'));
 }