diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index 11ef06b..37cb5f9 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -26,7 +26,7 @@
 #include "fw/forwarder.hpp"
 #include "tests/daemon/face/dummy-face.hpp"
 #include "dummy-strategy.hpp"
-#include "install-strategy.hpp"
+#include "choose-strategy.hpp"
 #include <ndn-cxx/lp/tags.hpp>
 
 #include "tests/test-common.hpp"
@@ -256,32 +256,32 @@
   forwarder.addFace(face1);
   forwarder.addFace(face2);
 
-  DummyStrategy& strategyP = choose<DummyStrategy>(forwarder, "ndn:/", "ndn:/strategyP");
-  DummyStrategy& strategyQ = choose<DummyStrategy>(forwarder, "ndn:/B", "ndn:/strategyQ");
+  DummyStrategy& strategyA = choose<DummyStrategy>(forwarder, "ndn:/", DummyStrategy::getStrategyName());
+  DummyStrategy& strategyB = choose<DummyStrategy>(forwarder, "ndn:/B", DummyStrategy::getStrategyName());
 
   shared_ptr<Interest> interest1 = makeInterest("ndn:/A/1");
-  strategyP.afterReceiveInterest_count = 0;
-  strategyP.interestOutFace = face2;
+  strategyA.afterReceiveInterest_count = 0;
+  strategyA.interestOutFace = face2;
   forwarder.startProcessInterest(*face1, *interest1);
-  BOOST_CHECK_EQUAL(strategyP.afterReceiveInterest_count, 1);
+  BOOST_CHECK_EQUAL(strategyA.afterReceiveInterest_count, 1);
 
   shared_ptr<Interest> interest2 = makeInterest("ndn:/B/2");
-  strategyQ.afterReceiveInterest_count = 0;
-  strategyQ.interestOutFace = face2;
+  strategyB.afterReceiveInterest_count = 0;
+  strategyB.interestOutFace = face2;
   forwarder.startProcessInterest(*face1, *interest2);
-  BOOST_CHECK_EQUAL(strategyQ.afterReceiveInterest_count, 1);
+  BOOST_CHECK_EQUAL(strategyB.afterReceiveInterest_count, 1);
 
   this->advanceClocks(time::milliseconds(1), time::milliseconds(5));
 
   shared_ptr<Data> data1 = makeData("ndn:/A/1/a");
-  strategyP.beforeSatisfyInterest_count = 0;
+  strategyA.beforeSatisfyInterest_count = 0;
   forwarder.startProcessData(*face2, *data1);
-  BOOST_CHECK_EQUAL(strategyP.beforeSatisfyInterest_count, 1);
+  BOOST_CHECK_EQUAL(strategyA.beforeSatisfyInterest_count, 1);
 
   shared_ptr<Data> data2 = makeData("ndn:/B/2/b");
-  strategyQ.beforeSatisfyInterest_count = 0;
+  strategyB.beforeSatisfyInterest_count = 0;
   forwarder.startProcessData(*face2, *data2);
-  BOOST_CHECK_EQUAL(strategyQ.beforeSatisfyInterest_count, 1);
+  BOOST_CHECK_EQUAL(strategyB.beforeSatisfyInterest_count, 1);
 
   shared_ptr<Interest> interest3 = makeInterest("ndn:/A/3");
   interest3->setInterestLifetime(time::milliseconds(30));
@@ -290,11 +290,11 @@
   interest4->setInterestLifetime(time::milliseconds(5000));
   forwarder.startProcessInterest(*face1, *interest4);
 
-  strategyP.beforeExpirePendingInterest_count = 0;
-  strategyQ.beforeExpirePendingInterest_count = 0;
+  strategyA.beforeExpirePendingInterest_count = 0;
+  strategyB.beforeExpirePendingInterest_count = 0;
   this->advanceClocks(time::milliseconds(10), time::milliseconds(100));
-  BOOST_CHECK_EQUAL(strategyP.beforeExpirePendingInterest_count, 1);
-  BOOST_CHECK_EQUAL(strategyQ.beforeExpirePendingInterest_count, 0);
+  BOOST_CHECK_EQUAL(strategyA.beforeExpirePendingInterest_count, 1);
+  BOOST_CHECK_EQUAL(strategyB.beforeExpirePendingInterest_count, 0);
 }
 
 BOOST_AUTO_TEST_CASE(IncomingData)
@@ -345,8 +345,8 @@
   forwarder.addFace(face2);
   forwarder.addFace(face3);
 
-  DummyStrategy& strategyP = choose<DummyStrategy>(forwarder, "ndn:/", "ndn:/strategyP");
-  DummyStrategy& strategyQ = choose<DummyStrategy>(forwarder, "ndn:/B", "ndn:/strategyQ");
+  DummyStrategy& strategyA = choose<DummyStrategy>(forwarder, "ndn:/", DummyStrategy::getStrategyName());
+  DummyStrategy& strategyB = choose<DummyStrategy>(forwarder, "ndn:/B", DummyStrategy::getStrategyName());
 
   Pit& pit = forwarder.getPit();
 
@@ -359,18 +359,18 @@
   pit2->insertOrUpdateOutRecord(*face1, *interest2);
 
   lp::Nack nack1 = makeNack("/A/AYJqayrzF", 562, lp::NackReason::CONGESTION);
-  strategyP.afterReceiveNack_count = 0;
-  strategyQ.afterReceiveNack_count = 0;
+  strategyA.afterReceiveNack_count = 0;
+  strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(*face1, nack1);
-  BOOST_CHECK_EQUAL(strategyP.afterReceiveNack_count, 1);
-  BOOST_CHECK_EQUAL(strategyQ.afterReceiveNack_count, 0);
+  BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 1);
+  BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
   lp::Nack nack2 = makeNack("/B/EVyP73ru", 221, lp::NackReason::CONGESTION);
-  strategyP.afterReceiveNack_count = 0;
-  strategyQ.afterReceiveNack_count = 0;
+  strategyA.afterReceiveNack_count = 0;
+  strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(*face1, nack2);
-  BOOST_CHECK_EQUAL(strategyP.afterReceiveNack_count, 0);
-  BOOST_CHECK_EQUAL(strategyQ.afterReceiveNack_count, 1);
+  BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
+  BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 1);
 
   // record Nack on PIT out-record
   pit::OutRecordCollection::iterator outRecord1 = pit1->getOutRecord(*face1);
@@ -380,11 +380,11 @@
 
   // drop if no PIT entry
   lp::Nack nack3 = makeNack("/yEcw5HhdM", 243, lp::NackReason::CONGESTION);
-  strategyP.afterReceiveNack_count = 0;
-  strategyQ.afterReceiveNack_count = 0;
+  strategyA.afterReceiveNack_count = 0;
+  strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(*face1, nack3);
-  BOOST_CHECK_EQUAL(strategyP.afterReceiveNack_count, 0);
-  BOOST_CHECK_EQUAL(strategyQ.afterReceiveNack_count, 0);
+  BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
+  BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
   // drop if no out-record
   shared_ptr<Interest> interest4 = makeInterest("/Etab4KpY", 157);
@@ -392,27 +392,27 @@
   pit4->insertOrUpdateOutRecord(*face1, *interest4);
 
   lp::Nack nack4a = makeNack("/Etab4KpY", 157, lp::NackReason::CONGESTION);
-  strategyP.afterReceiveNack_count = 0;
-  strategyQ.afterReceiveNack_count = 0;
+  strategyA.afterReceiveNack_count = 0;
+  strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(*face2, nack4a);
-  BOOST_CHECK_EQUAL(strategyP.afterReceiveNack_count, 0);
-  BOOST_CHECK_EQUAL(strategyQ.afterReceiveNack_count, 0);
+  BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
+  BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
   // drop if Nonce does not match out-record
   lp::Nack nack4b = makeNack("/Etab4KpY", 294, lp::NackReason::CONGESTION);
-  strategyP.afterReceiveNack_count = 0;
-  strategyQ.afterReceiveNack_count = 0;
+  strategyA.afterReceiveNack_count = 0;
+  strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(*face1, nack4b);
-  BOOST_CHECK_EQUAL(strategyP.afterReceiveNack_count, 0);
-  BOOST_CHECK_EQUAL(strategyQ.afterReceiveNack_count, 0);
+  BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
+  BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
   // drop if inFace is multi-access
   pit4->insertOrUpdateOutRecord(*face3, *interest4);
-  strategyP.afterReceiveNack_count = 0;
-  strategyQ.afterReceiveNack_count = 0;
+  strategyA.afterReceiveNack_count = 0;
+  strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(*face3, nack4a);
-  BOOST_CHECK_EQUAL(strategyP.afterReceiveNack_count, 0);
-  BOOST_CHECK_EQUAL(strategyQ.afterReceiveNack_count, 0);
+  BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
+  BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 }
 
 BOOST_AUTO_TEST_CASE(OutgoingNack)
