diff --git a/tests/daemon/fw/strategy-scope-control.t.cpp b/tests/daemon/fw/strategy-scope-control.t.cpp
index 392becb..8bd96d1 100644
--- a/tests/daemon/fw/strategy-scope-control.t.cpp
+++ b/tests/daemon/fw/strategy-scope-control.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -39,7 +39,7 @@
 #include "choose-strategy.hpp"
 #include "strategy-tester.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace nfd::tests {
 
@@ -85,31 +85,15 @@
 BOOST_AUTO_TEST_SUITE(TestStrategyScopeControl)
 
 template<typename S, bool WillSendNackNoRoute, bool CanProcessNack, bool WillRejectPitEntry>
-class Test
+struct Test
 {
-public:
   using Strategy = S;
-
-  static bool
-  willRejectPitEntry()
-  {
-    return WillRejectPitEntry;
-  }
-
-  static bool
-  willSendNackNoRoute()
-  {
-    return WillSendNackNoRoute;
-  }
-
-  static bool
-  canProcessNack()
-  {
-    return CanProcessNack;
-  }
+  static constexpr bool canProcessNack = CanProcessNack;
+  static constexpr bool willRejectPitEntry = WillRejectPitEntry;
+  static constexpr bool willSendNackNoRoute = WillSendNackNoRoute;
 };
 
-using Tests = boost::mpl::vector<
+using Tests = boost::mp11::mp_list<
   Test<AccessStrategy, false, false, true>,
   Test<AsfStrategy, true, false, true>,
   Test<BestRouteStrategy, true, true, true>,
@@ -148,11 +132,11 @@
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveInterest(*interest, FaceEndpoint(*this->localFace3), pitEntry); },
-    this->limitedIo, T::willRejectPitEntry() + T::willSendNackNoRoute()));
+    this->limitedIo, T::willRejectPitEntry + T::willSendNackNoRoute));
 
   BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
-  BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry());
-  if (T::willSendNackNoRoute()) {
+  BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry);
+  if (T::willSendNackNoRoute) {
     BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
     BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);
   }
@@ -191,11 +175,11 @@
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveInterest(*interest, FaceEndpoint(*this->nonLocalFace1), pitEntry); },
-    this->limitedIo, T::willRejectPitEntry() + T::willSendNackNoRoute()));
+    this->limitedIo, T::willRejectPitEntry + T::willSendNackNoRoute));
 
   BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
-  BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry());
-  if (T::willSendNackNoRoute()) {
+  BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry);
+  if (T::willSendNackNoRoute) {
     BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
     BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);
   }
@@ -237,11 +221,11 @@
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveNack(nack, FaceEndpoint(*this->localFace4), pitEntry); },
-    this->limitedIo, T::canProcessNack()));
+    this->limitedIo, T::canProcessNack));
 
   BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
   BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), 0);
-  if (T::canProcessNack()) {
+  if (T::canProcessNack) {
     BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
     BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);
   }
@@ -262,11 +246,11 @@
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveNack(nack, FaceEndpoint(*this->localFace4), pitEntry); },
-    this->limitedIo, T::canProcessNack()));
+    this->limitedIo, T::canProcessNack));
 
   BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
   BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), 0);
-  if (T::canProcessNack()) {
+  if (T::canProcessNack) {
     BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
     BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);
   }
