public function testWritesObjects()
{
$mock = new MockPlugin(array(new Response(200), new Response(201)));
$client = $this->getClient();
$client->addSubscriber($mock);
$adapter = new AwsS3($client, 'bucket');
$this->assertEquals(7, $adapter->write('foo', 'testing'));
$requests = $mock->getReceivedRequests();
$this->assertEquals('bucket.s3.amazonaws.com', $requests[1]->getHost());
$this->assertEquals('PUT', $requests[1]->getMethod());
}