/**
  * Creates GetBlobResult from getBlob call.
  * 
  * @param array  $headers  The HTTP response headers.
  * @param string $body     The response body.
  * @param array  $metadata The blob metadata.
  * 
  * @return GetBlobResult
  */
 public static function create($headers, $body, $metadata)
 {
     $result = new GetBlobResult();
     $result->setContentStream(Utilities::stringToStream($body));
     $result->setProperties(BlobProperties::create($headers));
     $result->setMetadata(is_null($metadata) ? array() : $metadata);
     return $result;
 }
 /**
  * @covers WindowsAzure\Blob\Models\GetBlobResult::getMetadata
  */
 public function testGetMetadata()
 {
     // Setup
     $properties = new GetBlobResult();
     $expected = array('key1' => 'value1', 'key2' => 'value2');
     $properties->setMetadata($expected);
     // Test
     $actual = $properties->getMetadata();
     // Assert
     $this->assertEquals($expected, $actual);
 }