@@ -408,7 +408,8 @@ public void sendCreateMultipartUploadRequest_withContentDisposition() throws Exc
408408 };
409409
410410 try (FakeHttpServer fakeHttpServer = FakeHttpServer .of (handler )) {
411- URI endpoint = URI .create (fakeHttpServer .getEndpoint () + "/" );
411+ MultipartUploadHttpRequestManager multipartUploadHttpRequestManager =
412+ MultipartUploadHttpRequestManager .createFrom (fakeHttpServer .getHttpStorageOptions ());
412413 CreateMultipartUploadRequest request =
413414 CreateMultipartUploadRequest .builder ()
414415 .bucket ("test-bucket" )
@@ -417,7 +418,7 @@ public void sendCreateMultipartUploadRequest_withContentDisposition() throws Exc
417418 .contentDisposition ("attachment; filename=\" test.txt\" " )
418419 .build ();
419420
420- multipartUploadHttpRequestManager .sendCreateMultipartUploadRequest (endpoint , request );
421+ multipartUploadHttpRequestManager .sendCreateMultipartUploadRequest (request );
421422 }
422423 }
423424
@@ -441,7 +442,8 @@ public void sendCreateMultipartUploadRequest_withContentEncoding() throws Except
441442 };
442443
443444 try (FakeHttpServer fakeHttpServer = FakeHttpServer .of (handler )) {
444- URI endpoint = URI .create (fakeHttpServer .getEndpoint () + "/" );
445+ MultipartUploadHttpRequestManager multipartUploadHttpRequestManager =
446+ MultipartUploadHttpRequestManager .createFrom (fakeHttpServer .getHttpStorageOptions ());
445447 CreateMultipartUploadRequest request =
446448 CreateMultipartUploadRequest .builder ()
447449 .bucket ("test-bucket" )
@@ -450,7 +452,7 @@ public void sendCreateMultipartUploadRequest_withContentEncoding() throws Except
450452 .contentEncoding ("gzip" )
451453 .build ();
452454
453- multipartUploadHttpRequestManager .sendCreateMultipartUploadRequest (endpoint , request );
455+ multipartUploadHttpRequestManager .sendCreateMultipartUploadRequest (request );
454456 }
455457 }
456458
@@ -474,7 +476,8 @@ public void sendCreateMultipartUploadRequest_withContentLanguage() throws Except
474476 };
475477
476478 try (FakeHttpServer fakeHttpServer = FakeHttpServer .of (handler )) {
477- URI endpoint = URI .create (fakeHttpServer .getEndpoint () + "/" );
479+ MultipartUploadHttpRequestManager multipartUploadHttpRequestManager =
480+ MultipartUploadHttpRequestManager .createFrom (fakeHttpServer .getHttpStorageOptions ());
478481 CreateMultipartUploadRequest request =
479482 CreateMultipartUploadRequest .builder ()
480483 .bucket ("test-bucket" )
@@ -483,7 +486,7 @@ public void sendCreateMultipartUploadRequest_withContentLanguage() throws Except
483486 .contentLanguage ("en" )
484487 .build ();
485488
486- multipartUploadHttpRequestManager .sendCreateMultipartUploadRequest (endpoint , request );
489+ multipartUploadHttpRequestManager .sendCreateMultipartUploadRequest (request );
487490 }
488491 }
489492
@@ -508,7 +511,8 @@ public void sendCreateMultipartUploadRequest_withCacheControl() throws Exception
508511 };
509512
510513 try (FakeHttpServer fakeHttpServer = FakeHttpServer .of (handler )) {
511- URI endpoint = URI .create (fakeHttpServer .getEndpoint () + "/" );
514+ MultipartUploadHttpRequestManager multipartUploadHttpRequestManager =
515+ MultipartUploadHttpRequestManager .createFrom (fakeHttpServer .getHttpStorageOptions ());
512516 CreateMultipartUploadRequest request =
513517 CreateMultipartUploadRequest .builder ()
514518 .bucket ("test-bucket" )
@@ -517,7 +521,7 @@ public void sendCreateMultipartUploadRequest_withCacheControl() throws Exception
517521 .cacheControl ("no-cache, no-store, max-age=0, must-revalidate" )
518522 .build ();
519523
520- multipartUploadHttpRequestManager .sendCreateMultipartUploadRequest (endpoint , request );
524+ multipartUploadHttpRequestManager .sendCreateMultipartUploadRequest (request );
521525 }
522526 }
523527
@@ -541,7 +545,8 @@ public void sendCreateMultipartUploadRequest_withUserProject() throws Exception
541545 };
542546
543547 try (FakeHttpServer fakeHttpServer = FakeHttpServer .of (handler )) {
544- URI endpoint = URI .create (fakeHttpServer .getEndpoint () + "/" );
548+ MultipartUploadHttpRequestManager multipartUploadHttpRequestManager =
549+ MultipartUploadHttpRequestManager .createFrom (fakeHttpServer .getHttpStorageOptions ());
545550 CreateMultipartUploadRequest request =
546551 CreateMultipartUploadRequest .builder ()
547552 .bucket ("test-bucket" )
@@ -550,7 +555,7 @@ public void sendCreateMultipartUploadRequest_withUserProject() throws Exception
550555 .userProject ("test-project" )
551556 .build ();
552557
553- multipartUploadHttpRequestManager .sendCreateMultipartUploadRequest (endpoint , request );
558+ multipartUploadHttpRequestManager .sendCreateMultipartUploadRequest (request );
554559 }
555560 }
556561
@@ -1002,7 +1007,8 @@ public void sendUploadPartRequest_withCustomChecksum() throws Exception {
10021007 };
10031008
10041009 try (FakeHttpServer fakeHttpServer = FakeHttpServer .of (handler )) {
1005- URI endpoint = URI .create (fakeHttpServer .getEndpoint () + "/" );
1010+ MultipartUploadHttpRequestManager multipartUploadHttpRequestManager =
1011+ MultipartUploadHttpRequestManager .createFrom (fakeHttpServer .getHttpStorageOptions ());
10061012 UploadPartRequest request =
10071013 UploadPartRequest .builder ()
10081014 .bucket ("test-bucket" )
@@ -1013,7 +1019,7 @@ public void sendUploadPartRequest_withCustomChecksum() throws Exception {
10131019 .build ();
10141020 UploadPartResponse response =
10151021 multipartUploadHttpRequestManager .sendUploadPartRequest (
1016- endpoint , request , RewindableContent .of (content .asByteBuffer ()));
1022+ request , RewindableContent .of (content .asByteBuffer ()));
10171023 assertThat (response ).isNotNull ();
10181024 assertThat (response .eTag ()).isEqualTo (etag );
10191025 }
0 commit comments