diff --git a/core/modules/big_pipe/tests/src/Unit/Render/ManyPlaceholderTest.php b/core/modules/big_pipe/tests/src/Unit/Render/ManyPlaceholderTest.php
index 3de77ec16a26d5f4ca483e169c142fd78b1ef57e..fb835e4ce5185c8515176a1ed77da393deee61f0 100644
--- a/core/modules/big_pipe/tests/src/Unit/Render/ManyPlaceholderTest.php
+++ b/core/modules/big_pipe/tests/src/Unit/Render/ManyPlaceholderTest.php
@@ -31,7 +31,7 @@ public function testManyNoJsPlaceHolders() {
       $this->prophesize(EventDispatcherInterface::class)->reveal(),
       $this->prophesize(ConfigFactoryInterface::class)->reveal()
     );
-    $response = new BigPipeResponse(HtmlResponse::create());
+    $response = new BigPipeResponse(new HtmlResponse());
 
     // Add many placeholders.
     $many_placeholders = [];
diff --git a/core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php b/core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php
index 59f9a3fdbb5f69936fc0184f11938ebfa2b88659..4c10cf80f6c1480851a4361714764a5be7f621f3 100644
--- a/core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php
+++ b/core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php
@@ -203,7 +203,7 @@ protected function getExpectedIncludedResourceResponse(array $include_paths, arr
     $basic_cacheability = (new CacheableMetadata())
       ->addCacheTags($this->getExpectedCacheTags())
       ->addCacheContexts($this->getExpectedCacheContexts());
-    return static::decorateExpectedResponseForIncludedFields(ResourceResponse::create($individual_document), $resource_data['responses'])
+    return static::decorateExpectedResponseForIncludedFields(new ResourceResponse($individual_document), $resource_data['responses'])
       ->addCacheableDependency($basic_cacheability);
   }
 
diff --git a/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php b/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
index e89aea1a1b810b77806dcc7d3976b13f0cf927c3..77200f6c64745cd594a9ae3da9372eaf309f66da 100644
--- a/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
+++ b/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
@@ -1253,7 +1253,7 @@ protected function getExpectedCollectionResponse(array $collection, $self_link,
     $cacheability = static::getExpectedCollectionCacheability($this->account, $collection, NULL, $filtered);
     $cacheability->setCacheMaxAge($merged_response->getCacheableMetadata()->getCacheMaxAge());
 
-    $collection_response = ResourceResponse::create($merged_document);
+    $collection_response = new ResourceResponse($merged_document);
     $collection_response->addCacheableDependency($cacheability);
 
     if (is_null($included_paths)) {