diff --git a/tests/daemon/rib/fib-updates-common.hpp b/tests/daemon/rib/fib-updates-common.hpp
index 15e623f..4230114 100644
--- a/tests/daemon/rib/fib-updates-common.hpp
+++ b/tests/daemon/rib/fib-updates-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2025,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -101,13 +101,6 @@
 class FibUpdatesFixture : public GlobalIoFixture, public KeyChainFixture
 {
 public:
-  FibUpdatesFixture()
-    : face(g_io, m_keyChain)
-    , controller(face, m_keyChain)
-    , fibUpdater(rib, controller)
-  {
-  }
-
   void
   insertRoute(const Name& name, uint64_t faceId,
               std::underlying_type_t<ndn::nfd::RouteOrigin> origin,
@@ -115,13 +108,7 @@
               std::underlying_type_t<ndn::nfd::RouteFlags> flags)
   {
     auto route = createRoute(faceId, origin, cost, flags);
-
-    rib::RibUpdate update;
-    update.setAction(rib::RibUpdate::REGISTER)
-          .setName(name)
-          .setRoute(route);
-
-    rib.beginApplyUpdate(update, nullptr, nullptr);
+    rib.beginApplyUpdate({rib::RibUpdate::REGISTER, name, route}, nullptr, nullptr);
     pollIo();
   }
 
@@ -130,13 +117,7 @@
              std::underlying_type_t<ndn::nfd::RouteOrigin> origin)
   {
     auto route = createRoute(faceId, origin, 0, 0);
-
-    rib::RibUpdate update;
-    update.setAction(rib::RibUpdate::UNREGISTER)
-          .setName(name)
-          .setRoute(route);
-
-    rib.beginApplyUpdate(update, nullptr, nullptr);
+    rib.beginApplyUpdate({rib::RibUpdate::UNREGISTER, name, route}, nullptr, nullptr);
     pollIo();
   }
 
@@ -167,11 +148,10 @@
   }
 
 public:
-  ndn::DummyClientFace face;
-  ndn::nfd::Controller controller;
-
+  ndn::DummyClientFace face{g_io, m_keyChain};
+  ndn::nfd::Controller controller{face, m_keyChain};
   rib::Rib rib;
-  MockFibUpdater fibUpdater;
+  MockFibUpdater fibUpdater{rib, controller};
 };
 
 } // namespace nfd::tests
diff --git a/tests/daemon/rib/rib-update.t.cpp b/tests/daemon/rib/rib-update-batch.t.cpp
similarity index 70%
rename from tests/daemon/rib/rib-update.t.cpp
rename to tests/daemon/rib/rib-update-batch.t.cpp
index 0941693..b2c8431 100644
--- a/tests/daemon/rib/rib-update.t.cpp
+++ b/tests/daemon/rib/rib-update-batch.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2024,  Regents of the University of California,
+ * Copyright (c) 2014-2025,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,7 +23,6 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "rib/rib-update.hpp"
 #include "rib/rib-update-batch.hpp"
 
 #include "tests/test-common.hpp"
@@ -34,48 +33,40 @@
 using namespace nfd::rib;
 
 BOOST_AUTO_TEST_SUITE(Rib)
-BOOST_AUTO_TEST_SUITE(TestRibUpdate)
+BOOST_AUTO_TEST_SUITE(TestRibUpdateBatch)
 
-BOOST_AUTO_TEST_CASE(Batch)
+BOOST_AUTO_TEST_CASE(AddAndIterate)
 {
   const uint64_t faceId = 1;
   RibUpdateBatch batch(faceId);
 
   Route routeRegister = createRoute(faceId, 128, 10, ndn::nfd::ROUTE_FLAG_CHILD_INHERIT);
-  RibUpdate registerUpdate;
-  registerUpdate.setAction(RibUpdate::REGISTER)
-                .setName("/a")
-                .setRoute(routeRegister);
-
+  RibUpdate registerUpdate{RibUpdate::REGISTER, "/a", routeRegister};
   batch.add(registerUpdate);
 
   BOOST_CHECK_EQUAL(batch.getFaceId(), faceId);
 
   Route routeUnregister = createRoute(faceId, 0, 0, ndn::nfd::ROUTE_FLAG_CAPTURE);
-  RibUpdate unregisterUpdate;
-  unregisterUpdate.setAction(RibUpdate::UNREGISTER)
-                  .setName("/a/b")
-                  .setRoute(routeUnregister);
-
+  RibUpdate unregisterUpdate{RibUpdate::UNREGISTER, "/a/b", routeUnregister};
   batch.add(unregisterUpdate);
 
   BOOST_REQUIRE_EQUAL(batch.size(), 2);
   auto it = batch.begin();
 
-  BOOST_CHECK_EQUAL(it->getAction(), RibUpdate::REGISTER);
-  BOOST_CHECK_EQUAL(it->getName(), "/a");
-  BOOST_CHECK_EQUAL(it->getRoute(), routeRegister);
+  BOOST_CHECK_EQUAL(it->action, RibUpdate::REGISTER);
+  BOOST_CHECK_EQUAL(it->name, "/a");
+  BOOST_CHECK_EQUAL(it->route, routeRegister);
 
   ++it;
-  BOOST_CHECK_EQUAL(it->getAction(), RibUpdate::UNREGISTER);
-  BOOST_CHECK_EQUAL(it->getName(), "/a/b");
-  BOOST_CHECK_EQUAL(it->getRoute(), routeUnregister);
+  BOOST_CHECK_EQUAL(it->action, RibUpdate::UNREGISTER);
+  BOOST_CHECK_EQUAL(it->name, "/a/b");
+  BOOST_CHECK_EQUAL(it->route, routeUnregister);
 
   ++it;
   BOOST_CHECK(it == batch.end());
 }
 
-BOOST_AUTO_TEST_SUITE_END() // TestRibUpdate
+BOOST_AUTO_TEST_SUITE_END() // TestRibUpdateBatch
 BOOST_AUTO_TEST_SUITE_END() // Rib
 
 } // namespace nfd::tests
