public function setContainerMetadata($containerName = '', $metadata = array(), $additionalHeaders = array())
    {
        Assertion::notEmpty($containerName, 'Container name is not specified');
        self::assertValidContainerName($containerName);
        Assertion::isArray($metadata, 'Meta data should be an array of key and value pairs.');

        if (count($metadata) == 0) {
            return;
        }

        $headers = array();
        $headers = array_merge($headers, $this->generateMetadataHeaders($metadata));

        foreach ($additionalHeaders as $key => $value) {
            $headers[$key] = $value;
        }

        $response = $this->performRequest($containerName, array('restype' => 'container', 'comp' => 'metadata'), 'PUT', $headers, false, null, self::RESOURCE_CONTAINER, self::PERMISSION_WRITE);
        if ( ! $response->isSuccessful()) {
            throw new BlobException($this->getErrorMessage($response, 'Resource could not be accessed.'));
        }
    }