       object-name (random-string)
       value (str "aaaaaaaaaa" "bbbbbbbbbb")
       file-name "./clj-mp-test.txt"]
-  (fact "mulitpart upload works"
-        (with-random-client c
-          (do
-            (s3/create-bucket c bucket-name)
-            (let [tm (create-and-configure-manager c)]
-              (write-file file-name value)
-              (upload-file tm bucket-name object-name file-name)
-              (let [fetched-object (s3/get-object
-                                      c bucket-name object-name)]
-                  [((comp slurp :content) fetched-object)
-                   ((comp etag-suffix :etag :metadata) fetched-object)]))))
+  (fact "multipart upload works"
+        (with-random-cred c
+          (do
+            (s3/create-bucket c bucket-name)
+            (write-file file-name value)
+            (upload-file c bucket-name object-name file-name 10)
+            (let [fetched-object (s3/get-object
+                                  c bucket-name object-name)]
+              [((comp slurp :content) fetched-object)
+               ((comp etag-suffix :etag :metadata) fetched-object)])))
         => [value, "-2"]))
 
 (let [bucket-name (random-string)

      value-string "this is the real value"]
  (fact "Creating an object with an (non-canned) ACL returns the same ACL
        when you read the ACL"
        (with-random-client c
          (do
            ;; create a bucket
            (s3/create-bucket c bucket-name)

            (let [value (input-stream-from-string value-string)
                  metadata (ObjectMetadata.)
                  user-two-id (:id (user-creation/create-random-user
                                     riak-cs-host-with-protocol
                                     (get-riak-cs-port)))
                  id-grantee (CanonicalGrantee. user-two-id)
                  grant (Grant. id-grantee read-grant)
                  acl (AccessControlList.)
                  req (PutObjectRequest. bucket-name object-name value metadata)]
              (.grantPermission acl id-grantee read-grant)
              (.setAccessControlList req acl)
              (.putObject c req)
              (contains?
                (.getGrants (.getObjectAcl c bucket-name object-name))
                grant))))
        => truthy))

(let [bucket-name (random-string)
      object-name (random-string)
      grant (Grant. all-users read-grant)]
  (fact "Creating a bucket with an ACL returns the same ACL when you read
        the ACL"
        (with-random-client c
            (let [acl (AccessControlList.)
                  req (CreateBucketRequest. bucket-name)]
              (.grantPermission acl all-users read-grant)
              (.setAccessControlList req acl)
              (.createBucket c req)
              (contains?
                (.getGrants (.getBucketAcl c bucket-name))
                grant)))
        => truthy))

(let [bucket-name (random-string)]
  (fact "Creating a bucket with an (non-canned) ACL returns the same ACL
        when you read the ACL"
        (with-random-client c
          (let [user-two-id (:id (user-creation/create-random-user
                                   riak-cs-host-with-protocol
                                   (get-riak-cs-port)))
                id-grantee (CanonicalGrantee. user-two-id)
                grant (Grant. id-grantee write-grant)
                acl (AccessControlList.)
                req (CreateBucketRequest. bucket-name)]
            (.grantPermission acl id-grantee write-grant)
            (.setAccessControlList req acl)
            (.createBucket c req)
            (contains?
              (.getGrants (.getBucketAcl c bucket-name))
              grant)))
        => truthy))

  (fact "check that the etag of the response
        is the same as the md5 of the original
        object"
        (with-random-cred c
          (do (s3/create-bucket c bucket-name)
            (s3/put-object c bucket-name object-name
                           value)
