 src/Render/BigPipeResponseAttachmentsProcessor.php                | 6 +-----
 tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/Render/BigPipeResponseAttachmentsProcessor.php b/src/Render/BigPipeResponseAttachmentsProcessor.php
index 5f176d7..37cde3d 100644
--- a/src/Render/BigPipeResponseAttachmentsProcessor.php
+++ b/src/Render/BigPipeResponseAttachmentsProcessor.php
@@ -13,7 +13,6 @@ use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Form\EnforcedResponseException;
 use Drupal\Core\Render\AttachmentsInterface;
 use Drupal\Core\Render\AttachmentsResponseProcessorInterface;
-use Drupal\Core\Render\HtmlResponse;
 use Drupal\Core\Render\HtmlResponseAttachmentsProcessor;
 use Drupal\Core\Render\RendererInterface;
 use Symfony\Component\HttpFoundation\RequestStack;
@@ -62,10 +61,7 @@ class BigPipeResponseAttachmentsProcessor extends HtmlResponseAttachmentsProcess
    * {@inheritdoc}
    */
   public function processAttachments(AttachmentsInterface $response) {
-    // @todo Convert to assertion once https://www.drupal.org/node/2408013 lands
-    if (!$response instanceof HtmlResponse) {
-      throw new \InvalidArgumentException('\Drupal\Core\Render\HtmlResponse instance expected.');
-    }
+    assert('$response instanceof \Drupal\Core\Render\HtmlResponse');
 
     // First, render the actual placeholders; this will cause the BigPipe
     // placeholder strategy to generate BigPipe placeholders. We need those to
diff --git a/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php b/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php
index 6870d06..b45129c 100644
--- a/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php
+++ b/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php
@@ -34,7 +34,7 @@ class BigPipeResponseAttachmentsProcessorTest extends UnitTestCase {
    *
    * @dataProvider nonHtmlResponseProvider
    *
-   * @expectedException \InvalidArgumentException
+   * @expectedException \AssertionError
    */
   public function testNonHtmlResponse($response_class) {
     $big_pipe_response_attachments_processor = $this->createBigPipeResponseAttachmentsProcessor($this->prophesize(AttachmentsResponseProcessorInterface::class));
