diff --git a/tests/daemon/fw/access-strategy.t.cpp b/tests/daemon/fw/access-strategy.t.cpp
index 148f5a8..2f825be 100644
--- a/tests/daemon/fw/access-strategy.t.cpp
+++ b/tests/daemon/fw/access-strategy.t.cpp
@@ -52,26 +52,6 @@
 // code style rule 3.25. This is necessary because some lines ends with '\' which
 // would cause "multi-line comment" compiler warning if '//' comments are used.
 
-BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestAccessStrategy, UnitTestTimeFixture)
-
-BOOST_AUTO_TEST_CASE(Registration)
-{
-  BOOST_CHECK_EQUAL(Strategy::listRegistered().count(AccessStrategy::getStrategyName()), 1);
-}
-
-BOOST_AUTO_TEST_CASE(InstanceName)
-{
-  Forwarder forwarder;
-  BOOST_REQUIRE(AccessStrategy::getStrategyName().at(-1).isVersion());
-  BOOST_CHECK_EQUAL(
-    AccessStrategy(forwarder, AccessStrategy::getStrategyName().getPrefix(-1)).getInstanceName(),
-    AccessStrategy::getStrategyName());
-  BOOST_CHECK_THROW(
-    AccessStrategy(forwarder, Name(AccessStrategy::getStrategyName()).append("param")),
-    std::invalid_argument);
-}
-
 class TwoLaptopsFixture : public UnitTestTimeFixture
 {
 protected:
@@ -108,7 +88,10 @@
   shared_ptr<TopologyLink> linkB;
 };
 
-BOOST_FIXTURE_TEST_CASE(OneProducer, TwoLaptopsFixture)
+BOOST_AUTO_TEST_SUITE(Fw)
+BOOST_FIXTURE_TEST_SUITE(TestAccessStrategy, TwoLaptopsFixture)
+
+BOOST_AUTO_TEST_CASE(OneProducer)
 {
   /*
    *             /------------------\
@@ -153,7 +136,7 @@
   BOOST_CHECK_LE(linkB->getFace(router).getCounters().nOutInterests, 5);
 }
 
-BOOST_FIXTURE_TEST_CASE(FastSlowProducer, TwoLaptopsFixture)
+BOOST_AUTO_TEST_CASE(FastSlowProducer)
 {
   /*
    *             /------------------\
@@ -200,7 +183,7 @@
   BOOST_CHECK_LE(linkB->getFace(router).getCounters().nOutInterests, 15);
 }
 
-BOOST_FIXTURE_TEST_CASE(ProducerMobility, TwoLaptopsFixture)
+BOOST_AUTO_TEST_CASE(ProducerMobility)
 {
   /*
    *           /------------------\                              /------------------\
@@ -259,7 +242,7 @@
   BOOST_CHECK_GE(consumer->getForwarderFace().getCounters().nOutData, 97);
 }
 
-BOOST_FIXTURE_TEST_CASE(Bidirectional, TwoLaptopsFixture)
+BOOST_AUTO_TEST_CASE(Bidirectional)
 {
   /*
    *                         /laptops << +--------+ >> /laptops
@@ -305,7 +288,7 @@
   BOOST_CHECK_GE(consumerBA->getForwarderFace().getCounters().nOutData, 97);
 }
 
-BOOST_FIXTURE_TEST_CASE(PacketLoss, TwoLaptopsFixture)
+BOOST_AUTO_TEST_CASE(PacketLoss)
 {
   /*
    *   test case Interests
@@ -377,7 +360,7 @@
   BOOST_CHECK_EQUAL(hasData2c, true);
 }
 
-BOOST_FIXTURE_TEST_CASE(Bug2831, TwoLaptopsFixture)
+BOOST_AUTO_TEST_CASE(Bug2831)
 {
   // make a two-node loop
   topo.registerPrefix(laptopA, linkA->getFace(laptopA), "ndn:/net");
diff --git a/tests/daemon/fw/asf-strategy.t.cpp b/tests/daemon/fw/asf-strategy.t.cpp
index c370cbd..750effd 100644
--- a/tests/daemon/fw/asf-strategy.t.cpp
+++ b/tests/daemon/fw/asf-strategy.t.cpp
@@ -43,23 +43,6 @@
 BOOST_AUTO_TEST_SUITE(Fw)
 BOOST_FIXTURE_TEST_SUITE(TestAsfStrategy, UnitTestTimeFixture)
 
-BOOST_AUTO_TEST_CASE(Registration)
-{
-  BOOST_CHECK_EQUAL(Strategy::listRegistered().count(AsfStrategy::getStrategyName()), 1);
-}
-
-BOOST_AUTO_TEST_CASE(InstanceName)
-{
-  Forwarder forwarder;
-  BOOST_REQUIRE(AsfStrategy::getStrategyName().at(-1).isVersion());
-  BOOST_CHECK_EQUAL(
-    AsfStrategy(forwarder, AsfStrategy::getStrategyName().getPrefix(-1)).getInstanceName(),
-    AsfStrategy::getStrategyName());
-  BOOST_CHECK_THROW(
-    AsfStrategy(forwarder, Name(AsfStrategy::getStrategyName()).append("param")),
-    std::invalid_argument);
-}
-
 class AsfGridFixture : public UnitTestTimeFixture
 {
 protected:
diff --git a/tests/daemon/fw/best-route-strategy.t.cpp b/tests/daemon/fw/best-route-strategy.t.cpp
index a28ec83..7a2db75 100644
--- a/tests/daemon/fw/best-route-strategy.t.cpp
+++ b/tests/daemon/fw/best-route-strategy.t.cpp
@@ -38,29 +38,6 @@
 typedef StrategyTester<BestRouteStrategy> BestRouteStrategyTester;
 NFD_REGISTER_STRATEGY(BestRouteStrategyTester);
 
-BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestBestRouteStrategy, BaseFixture)
-
-BOOST_AUTO_TEST_CASE(Registration)
-{
-  BOOST_CHECK_EQUAL(Strategy::listRegistered().count(BestRouteStrategy::getStrategyName()), 1);
-}
-
-BOOST_AUTO_TEST_CASE(InstanceName)
-{
-  Forwarder forwarder;
-  BOOST_REQUIRE(BestRouteStrategy::getStrategyName().at(-1).isVersion());
-  BOOST_CHECK_EQUAL(
-    BestRouteStrategy(forwarder, BestRouteStrategy::getStrategyName().getPrefix(-1)).getInstanceName(),
-    BestRouteStrategy::getStrategyName());
-  BOOST_CHECK_THROW(
-    BestRouteStrategy(forwarder, Name(BestRouteStrategy::getStrategyName()).append("param")),
-    std::invalid_argument);
-}
-
-BOOST_AUTO_TEST_SUITE_END() // TestBestRouteStrategy
-BOOST_AUTO_TEST_SUITE_END() // Fw
-
 } // namespace tests
 } // namespace fw
 } // namespace nfd
diff --git a/tests/daemon/fw/best-route-strategy2.t.cpp b/tests/daemon/fw/best-route-strategy2.t.cpp
index 6a1848e..fcd7b9f 100644
--- a/tests/daemon/fw/best-route-strategy2.t.cpp
+++ b/tests/daemon/fw/best-route-strategy2.t.cpp
@@ -76,23 +76,6 @@
 
 BOOST_FIXTURE_TEST_SUITE(TestBestRouteStrategy2, BestRouteStrategy2Fixture)
 
-BOOST_AUTO_TEST_CASE(Registration)
-{
-  BOOST_CHECK_EQUAL(Strategy::listRegistered().count(BestRouteStrategy2::getStrategyName()), 1);
-}
-
-BOOST_AUTO_TEST_CASE(InstanceName)
-{
-  Forwarder forwarder;
-  BOOST_REQUIRE(BestRouteStrategy2::getStrategyName().at(-1).isVersion());
-  BOOST_CHECK_EQUAL(
-    BestRouteStrategy2(forwarder, BestRouteStrategy2::getStrategyName().getPrefix(-1)).getInstanceName(),
-    BestRouteStrategy2::getStrategyName());
-  BOOST_CHECK_THROW(
-    BestRouteStrategy2(forwarder, Name(BestRouteStrategy2::getStrategyName()).append("param")),
-    std::invalid_argument);
-}
-
 BOOST_AUTO_TEST_CASE(Forward)
 {
   fib::Entry& fibEntry = *fib.insert(Name()).first;
diff --git a/tests/daemon/fw/client-control-strategy.t.cpp b/tests/daemon/fw/client-control-strategy.t.cpp
deleted file mode 100644
index b03673a..0000000
--- a/tests/daemon/fw/client-control-strategy.t.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "fw/client-control-strategy.hpp"
-
-#include "tests/test-common.hpp"
-
-namespace nfd {
-namespace fw {
-namespace tests {
-
-using namespace nfd::tests;
-
-BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestClientControlStrategy, BaseFixture)
-
-BOOST_AUTO_TEST_CASE(Registration)
-{
-  BOOST_CHECK_EQUAL(Strategy::listRegistered().count(ClientControlStrategy::getStrategyName()), 1);
-}
-
-BOOST_AUTO_TEST_CASE(InstanceName)
-{
-  Forwarder forwarder;
-  BOOST_REQUIRE(ClientControlStrategy::getStrategyName().at(-1).isVersion());
-  BOOST_CHECK_EQUAL(
-    ClientControlStrategy(forwarder, ClientControlStrategy::getStrategyName().getPrefix(-1)).getInstanceName(),
-    ClientControlStrategy::getStrategyName());
-  BOOST_CHECK_THROW(
-    ClientControlStrategy(forwarder, Name(ClientControlStrategy::getStrategyName()).append("param")),
-    std::invalid_argument);
-}
-
-BOOST_AUTO_TEST_SUITE_END() // TestClientControlStrategy
-BOOST_AUTO_TEST_SUITE_END() // Fw
-
-} // namespace tests
-} // namespace fw
-} // namespace nfd
diff --git a/tests/daemon/fw/multicast-strategy.t.cpp b/tests/daemon/fw/multicast-strategy.t.cpp
index 49bf940..de00ff6 100644
--- a/tests/daemon/fw/multicast-strategy.t.cpp
+++ b/tests/daemon/fw/multicast-strategy.t.cpp
@@ -67,23 +67,6 @@
 BOOST_AUTO_TEST_SUITE(Fw)
 BOOST_FIXTURE_TEST_SUITE(TestMulticastStrategy, MulticastStrategyFixture)
 
-BOOST_AUTO_TEST_CASE(Registration)
-{
-  BOOST_CHECK_EQUAL(Strategy::listRegistered().count(MulticastStrategy::getStrategyName()), 1);
-}
-
-BOOST_AUTO_TEST_CASE(InstanceName)
-{
-  Forwarder forwarder;
-  BOOST_REQUIRE(MulticastStrategy::getStrategyName().at(-1).isVersion());
-  BOOST_CHECK_EQUAL(
-    MulticastStrategy(forwarder, MulticastStrategy::getStrategyName().getPrefix(-1)).getInstanceName(),
-    MulticastStrategy::getStrategyName());
-  BOOST_CHECK_THROW(
-    MulticastStrategy(forwarder, Name(MulticastStrategy::getStrategyName()).append("param")),
-    std::invalid_argument);
-}
-
 BOOST_AUTO_TEST_CASE(Forward2)
 {
   fib::Entry& fibEntry = *fib.insert(Name()).first;
diff --git a/tests/daemon/fw/ncc-strategy.t.cpp b/tests/daemon/fw/ncc-strategy.t.cpp
index bc617c7..2e9ee18 100644
--- a/tests/daemon/fw/ncc-strategy.t.cpp
+++ b/tests/daemon/fw/ncc-strategy.t.cpp
@@ -43,23 +43,6 @@
 BOOST_AUTO_TEST_SUITE(Fw)
 BOOST_FIXTURE_TEST_SUITE(TestNccStrategy, UnitTestTimeFixture)
 
-BOOST_AUTO_TEST_CASE(Registration)
-{
-  BOOST_CHECK_EQUAL(Strategy::listRegistered().count(NccStrategy::getStrategyName()), 1);
-}
-
-BOOST_AUTO_TEST_CASE(InstanceName)
-{
-  Forwarder forwarder;
-  BOOST_REQUIRE(NccStrategy::getStrategyName().at(-1).isVersion());
-  BOOST_CHECK_EQUAL(
-    NccStrategy(forwarder, NccStrategy::getStrategyName().getPrefix(-1)).getInstanceName(),
-    NccStrategy::getStrategyName());
-  BOOST_CHECK_THROW(
-    NccStrategy(forwarder, Name(NccStrategy::getStrategyName()).append("param")),
-    std::invalid_argument);
-}
-
 BOOST_AUTO_TEST_CASE(FavorRespondingUpstream)
 {
   // NccStrategy is fairly complex.
diff --git a/tests/daemon/fw/strategy-instantiation.t.cpp b/tests/daemon/fw/strategy-instantiation.t.cpp
new file mode 100644
index 0000000..21ab9a5
--- /dev/null
+++ b/tests/daemon/fw/strategy-instantiation.t.cpp
@@ -0,0 +1,130 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/** \file
+ *  This test suite tests instantiation logic in strategies.
+ */
+
+// All strategies, sorted alphabetically.
+#include "fw/access-strategy.hpp"
+#include "fw/asf-strategy.hpp"
+#include "fw/best-route-strategy.hpp"
+#include "fw/best-route-strategy2.hpp"
+#include "fw/client-control-strategy.hpp"
+#include "fw/multicast-strategy.hpp"
+#include "fw/ncc-strategy.hpp"
+
+#include "tests/test-common.hpp"
+#include <boost/mpl/vector.hpp>
+
+namespace nfd {
+namespace fw {
+namespace tests {
+
+using namespace nfd::tests;
+
+BOOST_AUTO_TEST_SUITE(Fw)
+BOOST_AUTO_TEST_SUITE(TestStrategyInstantiation)
+
+template<typename S, bool CanAcceptParameters, uint64_t MinVersion>
+class Test
+{
+public:
+  using Strategy = S;
+
+  static bool
+  canAcceptParameters()
+  {
+    return CanAcceptParameters;
+  }
+
+  static uint64_t
+  getMinVersion()
+  {
+    return MinVersion;
+  }
+
+  static Name
+  getVersionedStrategyName(uint64_t version)
+  {
+    return S::getStrategyName().getPrefix(-1).appendVersion(version);
+  }
+};
+
+using Tests = boost::mpl::vector<
+  Test<AccessStrategy, false, 1>,
+  Test<AsfStrategy, true, 1>,
+  Test<BestRouteStrategy, false, 1>,
+  Test<BestRouteStrategy2, false, 4>,
+  Test<ClientControlStrategy, false, 2>,
+  Test<MulticastStrategy, false, 1>,
+  Test<NccStrategy, false, 1>
+>;
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(Registration, T, Tests)
+{
+  BOOST_CHECK_EQUAL(Strategy::listRegistered().count(T::Strategy::getStrategyName()), 1);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(InstanceName, T, Tests)
+{
+  BOOST_REQUIRE(T::Strategy::getStrategyName().at(-1).isVersion());
+  uint64_t maxVersion = T::Strategy::getStrategyName().at(-1).toVersion();
+  BOOST_REQUIRE_LE(T::getMinVersion(), maxVersion);
+
+  Forwarder forwarder;
+  for (uint64_t version = T::getMinVersion(); version <= maxVersion; ++version) {
+    Name versionedName = T::getVersionedStrategyName(version);
+    unique_ptr<typename T::Strategy> instance;
+    BOOST_CHECK_NO_THROW(instance = make_unique<typename T::Strategy>(forwarder, versionedName));
+    BOOST_CHECK_EQUAL(instance->getInstanceName(), versionedName);
+
+    if (!T::canAcceptParameters()) {
+      Name nameWithParameters = Name(versionedName).append("param");
+      BOOST_CHECK_THROW(typename T::Strategy(forwarder, nameWithParameters), std::invalid_argument);
+    }
+  }
+
+  if (T::getMinVersion() > 0) {
+    Name version0Name = T::getVersionedStrategyName(0);
+    BOOST_CHECK_THROW(typename T::Strategy(forwarder, version0Name), std::invalid_argument);
+    Name earlyVersionName = T::getVersionedStrategyName(T::getMinVersion() - 1);
+    BOOST_CHECK_THROW(typename T::Strategy(forwarder, earlyVersionName), std::invalid_argument);
+  }
+
+  if (maxVersion < std::numeric_limits<uint64_t>::max()) {
+    Name versionMaxName = T::getVersionedStrategyName(std::numeric_limits<uint64_t>::max());
+    BOOST_CHECK_THROW(typename T::Strategy(forwarder, versionMaxName), std::invalid_argument);
+    Name lateVersionName = T::getVersionedStrategyName(maxVersion + 1);
+    BOOST_CHECK_THROW(typename T::Strategy(forwarder, lateVersionName), std::invalid_argument);
+  }
+}
+
+BOOST_AUTO_TEST_SUITE_END() // TestStrategyInstantiation
+BOOST_AUTO_TEST_SUITE_END() // Fw
+
+} // namespace tests
+} // namespace fw
+} // namespace nfd
diff --git a/tests/daemon/fw/strategy.t.cpp b/tests/daemon/fw/strategy.t.cpp
index 0ac550a..72d43b4 100644
--- a/tests/daemon/fw/strategy.t.cpp
+++ b/tests/daemon/fw/strategy.t.cpp
@@ -41,6 +41,8 @@
 BOOST_AUTO_TEST_SUITE(Fw)
 BOOST_FIXTURE_TEST_SUITE(TestStrategy, BaseFixture)
 
+// Strategy registry is tested in table/strategy-choice.t.cpp and strategy-instantiation.t.cpp
+
 class FaceTableAccessTestStrategy : public DummyStrategy
 {
 public:
diff --git a/tests/daemon/table/strategy-choice.t.cpp b/tests/daemon/table/strategy-choice.t.cpp
index 4508391..dd2fa5e 100644
--- a/tests/daemon/table/strategy-choice.t.cpp
+++ b/tests/daemon/table/strategy-choice.t.cpp
@@ -31,6 +31,8 @@
 namespace nfd {
 namespace tests {
 
+using fw::Strategy;
+
 class StrategyChoiceFixture : public BaseFixture
 {
 protected:
@@ -43,10 +45,13 @@
     DummyStrategy::registerAs(strategyNameQ);
   }
 
+  /** \brief insert StrategyChoice entry at \p prefix for \p instanceName
+   *  \return constructed instance name
+   */
   Name
-  insertAndGet(const Name& prefix, const Name& strategyName)
+  insertAndGet(const Name& prefix, const Name& instanceName)
   {
-    BOOST_REQUIRE(sc.insert(prefix, strategyName));
+    BOOST_REQUIRE(sc.insert(prefix, instanceName));
     bool isFound;
     Name foundName;
     std::tie(isFound, foundName) = sc.get(prefix);
@@ -54,6 +59,17 @@
     return foundName;
   }
 
+  /** \brief determine whether the effective strategy type at \p prefix is \p S
+   *  \tparam S expected strategy type
+   */
+  template<typename S>
+  bool
+  isStrategyType(const Name& prefix)
+  {
+    Strategy& effectiveStrategy = sc.findEffectiveStrategy(prefix);
+    return dynamic_cast<S*>(&effectiveStrategy) != nullptr;
+  }
+
   template<typename Q>
   Name
   findInstanceName(const Q& query)
@@ -72,8 +88,6 @@
 BOOST_AUTO_TEST_SUITE(Table)
 BOOST_FIXTURE_TEST_SUITE(TestStrategyChoice, StrategyChoiceFixture)
 
-using fw::Strategy;
-
 BOOST_AUTO_TEST_CASE(Versioning)
 {
   const Name strategyNameV("/strategy-choice-V");
@@ -90,15 +104,21 @@
 
   // unversioned: choose latest version
   BOOST_CHECK_EQUAL(this->insertAndGet("/A", strategyNameV), strategyNameV4);
+  BOOST_CHECK(this->isStrategyType<VersionedDummyStrategy<4>>("/A"));
 
   // exact version: choose same version
   BOOST_CHECK_EQUAL(this->insertAndGet("/B", strategyNameV1), strategyNameV1);
+  BOOST_CHECK(this->isStrategyType<VersionedDummyStrategy<1>>("/B"));
   BOOST_CHECK_EQUAL(this->insertAndGet("/C", strategyNameV3), strategyNameV3);
+  BOOST_CHECK(this->isStrategyType<VersionedDummyStrategy<3>>("/C"));
   BOOST_CHECK_EQUAL(this->insertAndGet("/D", strategyNameV4), strategyNameV4);
+  BOOST_CHECK(this->isStrategyType<VersionedDummyStrategy<4>>("/D"));
 
   // lower version: choose next higher version
-  // BOOST_CHECK_EQUAL(this->insertAndGet("/E", strategyNameV0), strategyNameV1);
-  // BOOST_CHECK_EQUAL(this->insertAndGet("/F", strategyNameV2), strategyNameV3);
+  BOOST_CHECK_EQUAL(this->insertAndGet("/E", strategyNameV0), strategyNameV0);
+  BOOST_CHECK(this->isStrategyType<VersionedDummyStrategy<1>>("/E"));
+  BOOST_CHECK_EQUAL(this->insertAndGet("/F", strategyNameV2), strategyNameV2);
+  BOOST_CHECK(this->isStrategyType<VersionedDummyStrategy<3>>("/F"));
 
   // higher version: failure
   BOOST_CHECK_EQUAL(sc.insert("/G", strategyNameV5), false);
