docs: public Response saveAttachment(InputStream in, String name, String contentType, String docId,
                                     String docRev) {
          assertNotEmpty(in, "in");
          assertNotEmpty(name, "name");
          assertNotEmpty(contentType, "ContentType");
          if (docId == null) {
              docId = generateUUID();
              // A new doc is being created; there should be no revision specified.
              assertNull(docRev, "docRev");
          } else {
              // The id has been specified, ensure it is not empty
              assertNotEmpty(docId, "docId");
              if (docRev != null) {
                  // Existing doc with the specified ID, ensure rev is not empty
                  assertNotEmpty(docRev, "docRev");
              }
          }
          final URI uri = new DatabaseURIHelper(dbUri).attachmentUri(docId, docRev, name);
          return couchDbClient.put(uri, in, contentType);
      }