# File lib/fog/aws/requests/storage/shared_mock_methods.rb, line 49
        def store_mock_object(bucket, object_name, body, options)
          object = {
            :body             => body,
            'Content-Type'    => options['Content-Type'],
            'ETag'            => OpenSSL::Digest::MD5.hexdigest(body),
            'Key'             => object_name,
            'Last-Modified'   => Fog::Time.now.to_date_header,
            'Content-Length'  => options['Content-Length'],
            'StorageClass'    => options['x-amz-storage-class'] || 'STANDARD',
            'VersionId'       => bucket[:versioning] == 'Enabled' ? Fog::Mock.random_base64(32) : 'null'
          }

          for key, value in options
            case key
            when 'Cache-Control', 'Content-Disposition', 'Content-Encoding', 'Content-MD5', 'Expires', /^x-amz-meta-/
              object[key] = value
            end
          end

          if bucket[:versioning]
            bucket[:objects][object_name] ||= []

            # When versioning is suspended, putting an object will create a new 'null' version if the latest version
            # is a value other than 'null', otherwise it will replace the latest version.
            if bucket[:versioning] == 'Suspended' && bucket[:objects][object_name].first['VersionId'] == 'null'
              bucket[:objects][object_name].shift
            end

            bucket[:objects][object_name].unshift(object)
          else
            bucket[:objects][object_name] = [object]
          end

          object
        end