public function testListContents()
 {
     $mock = $this->getS3Client();
     $result = new \ArrayIterator([['Key' => 'file.ext', 'ContentLength' => 20, 'ContentType' => 'text/plain'], ['Key' => 'path/to_another/dir/', 'LastModified' => '2011-01-01']]);
     $mock->shouldReceive('getIterator')->once()->andReturn($result);
     $adapter = new Adapter($mock, 'bucketname');
     $listing = $adapter->listContents();
     $this->assertCount(4, $listing);
     $first = reset($listing);
     $this->assertArrayHasKey('path', $first);
     $this->assertArrayHasKey('type', $first);
     $this->assertArrayHasKey('mimetype', $first);
     $last = end($listing);
     $this->assertArrayHasKey('path', $first);
     $this->assertArrayHasKey('type', $first);
     $this->assertEquals($last['type'], 'dir');
 }