diff --git a/core/modules/ban/src/Plugin/migrate/destination/BlockedIp.php b/core/modules/ban/src/Plugin/migrate/destination/BlockedIp.php
index 14cb3cd251a7f3c46cb703dea773b0b344bff517..b0c0e482daef8018f918312002b4cd1d8dcb0627 100644
--- a/core/modules/ban/src/Plugin/migrate/destination/BlockedIp.php
+++ b/core/modules/ban/src/Plugin/migrate/destination/BlockedIp.php
@@ -78,6 +78,8 @@ public function fields() {
    */
   public function import(Row $row, array $old_destination_id_values = []) {
     $this->banManager->banIp($row->getDestinationProperty('ip'));
+
+    return ['ip' => $row->getDestinationProperty('ip')];
   }
 
 }
diff --git a/core/modules/ban/tests/src/Kernel/Migrate/d7/MigrateBlockedIpsTest.php b/core/modules/ban/tests/src/Kernel/Migrate/d7/MigrateBlockedIpsTest.php
index f814e1962793d0f3ef0ff22098ec5fdec644502f..c63b752280842475fa6d0fe76acb5554ee904ef7 100644
--- a/core/modules/ban/tests/src/Kernel/Migrate/d7/MigrateBlockedIpsTest.php
+++ b/core/modules/ban/tests/src/Kernel/Migrate/d7/MigrateBlockedIpsTest.php
@@ -27,13 +27,15 @@ class MigrateBlockedIpsTest extends MigrateDrupal7TestBase {
   protected function setUp(): void {
     parent::setUp();
     $this->installSchema('ban', ['ban_ip']);
-    $this->executeMigration('d7_blocked_ips');
   }
 
   /**
    * Tests migration of blocked IPs.
    */
   public function testBlockedIps() {
+    $this->startCollectingMessages();
+    $this->executeMigration('d7_blocked_ips');
+    $this->assertEmpty($this->migrateMessages);
     $this->assertTrue(\Drupal::service('ban.ip_manager')->isBanned('111.111.111.111'));
   }