diff --git a/tests/mgmt/strategy-choice-manager.cpp b/tests/mgmt/strategy-choice-manager.cpp
index dd3291b..6577f6d 100644
--- a/tests/mgmt/strategy-choice-manager.cpp
+++ b/tests/mgmt/strategy-choice-manager.cpp
@@ -12,7 +12,7 @@
 #include "fw/forwarder.hpp"
 #include "fw/strategy.hpp"
 #include "tests/face/dummy-face.hpp"
-
+#include "tests/fw/dummy-strategy.hpp"
 
 #include "tests/test-common.hpp"
 #include "validation-common.hpp"
@@ -22,73 +22,18 @@
 
 NFD_LOG_INIT("StrategyChoiceManagerTest");
 
-class DummyStrategy : public fw::Strategy
-{
-public:
-  DummyStrategy(Forwarder& forwarder, const Name& strategyName)
-    : fw::Strategy(forwarder, strategyName)
-  {
-
-  }
-
-  virtual
-  ~DummyStrategy()
-  {
-
-  }
-
-  virtual void
-  afterReceiveInterest(const Face& inFace,
-                       const Interest& interest,
-                       shared_ptr<fib::Entry> fibEntry,
-                       shared_ptr<pit::Entry> pitEntry)
-  {
-
-  }
-};
-
-class TestStrategyA : public DummyStrategy
-{
-public:
-  TestStrategyA(Forwarder& forwarder)
-    : DummyStrategy(forwarder, "/localhost/nfd/strategy/test-strategy-a")
-  {
-  }
-
-  virtual
-  ~TestStrategyA()
-  {
-
-  }
-};
-
-class TestStrategyB : public DummyStrategy
-{
-public:
-  TestStrategyB(Forwarder& forwarder)
-    : DummyStrategy(forwarder, "/localhost/nfd/strategy/test-strategy-b")
-  {
-  }
-
-  virtual
-  ~TestStrategyB()
-  {
-
-  }
-};
-
 class StrategyChoiceManagerFixture : protected BaseFixture
 {
 public:
 
   StrategyChoiceManagerFixture()
-    : m_nameTree(1024)
-    , m_strategyChoice(m_nameTree, make_shared<TestStrategyA>(boost::ref(m_forwarder)))
+    : m_strategyChoice(m_forwarder.getStrategyChoice())
     , m_face(make_shared<InternalFace>())
     , m_manager(m_strategyChoice, m_face)
     , m_callbackFired(false)
   {
-
+    m_strategyChoice.install(make_shared<DummyStrategy>(boost::ref(m_forwarder), "/localhost/nfd/strategy/test-strategy-a"));
+    m_strategyChoice.insert("ndn:/", "/localhost/nfd/strategy/test-strategy-a");
   }
 
   virtual
@@ -193,8 +138,7 @@
 
 protected:
   Forwarder m_forwarder;
-  NameTree m_nameTree;
-  StrategyChoice m_strategyChoice;
+  StrategyChoice& m_strategyChoice;
   shared_ptr<InternalFace> m_face;
   StrategyChoiceManager m_manager;
 
@@ -207,7 +151,7 @@
 public:
   AllStrategiesFixture()
   {
-    m_strategyChoice.install(make_shared<TestStrategyB>(boost::ref(m_forwarder)));
+    m_strategyChoice.install(make_shared<DummyStrategy>(boost::ref(m_forwarder), "/localhost/nfd/strategy/test-strategy-b"));
   }
 
   virtual
diff --git a/tests/mgmt/validation-common.cpp b/tests/mgmt/validation-common.cpp
new file mode 100644
index 0000000..3ad1701
--- /dev/null
+++ b/tests/mgmt/validation-common.cpp
@@ -0,0 +1,33 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (C) 2014 Named Data Networking Project
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "validation-common.hpp"
+
+#include <boost/test/unit_test.hpp>
+
+namespace nfd {
+namespace tests {
+
+const Name CommandIdentityGlobalFixture::s_identityName("/unit-test/CommandFixture/id");
+shared_ptr<ndn::IdentityCertificate> CommandIdentityGlobalFixture::s_certificate;
+
+CommandIdentityGlobalFixture::CommandIdentityGlobalFixture()
+{
+  BOOST_ASSERT(!static_cast<bool>(s_certificate));
+  s_certificate = m_keys.getCertificate(m_keys.createIdentity(s_identityName));
+}
+
+CommandIdentityGlobalFixture::~CommandIdentityGlobalFixture()
+{
+  s_certificate.reset();
+  m_keys.deleteIdentity(s_identityName);
+}
+
+BOOST_GLOBAL_FIXTURE(CommandIdentityGlobalFixture);
+
+} // namespace tests
+} // namespace nfd
+
diff --git a/tests/mgmt/validation-common.hpp b/tests/mgmt/validation-common.hpp
index 8e16103..9b876d9 100644
--- a/tests/mgmt/validation-common.hpp
+++ b/tests/mgmt/validation-common.hpp
@@ -4,9 +4,10 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef VALIDATION_COMMON_HPP
-#define VALIDATION_COMMON_HPP
+#ifndef NFD_TEST_MGMT_VALIDATION_COMMON_HPP
+#define NFD_TEST_MGMT_VALIDATION_COMMON_HPP
 
+#include "common.hpp"
 #include <ndn-cpp-dev/util/command-interest-generator.hpp>
 
 namespace nfd {
@@ -29,6 +30,30 @@
 //   shared_ptr<ndn::CommandInterestValidator> m_validator;
 // };
 
+/// a global fixture that holds the identity for CommandFixture
+class CommandIdentityGlobalFixture
+{
+public:
+  CommandIdentityGlobalFixture();
+
+  ~CommandIdentityGlobalFixture();
+  
+  static const Name& getIdentityName()
+  {
+    return s_identityName;
+  }
+  
+  static shared_ptr<ndn::IdentityCertificate> getCertificate()
+  {
+    BOOST_ASSERT(static_cast<bool>(s_certificate));
+    return s_certificate;
+  }
+
+private:
+  ndn::KeyChain m_keys;
+  static const Name s_identityName;
+  static shared_ptr<ndn::IdentityCertificate> s_certificate;
+};
 
 template<typename T>
 class CommandFixture : public T
@@ -37,33 +62,27 @@
   virtual
   ~CommandFixture()
   {
-    m_keys.deleteIdentity(m_identityName);
-
   }
 
   void
   generateCommand(Interest& interest)
   {
-    m_generator.generateWithIdentity(interest, m_identityName);
+    m_generator.generateWithIdentity(interest, getIdentityName());
   }
 
   const Name&
   getIdentityName() const
   {
-    return m_identityName;
+    return CommandIdentityGlobalFixture::getIdentityName();
   }
 
 protected:
   CommandFixture()
-    : m_identityName("/unit-test/CommandFixture/id"),
-      m_certificate(m_keys.getCertificate(m_keys.createIdentity(m_identityName)))
+    : m_certificate(CommandIdentityGlobalFixture::getCertificate())
   {
-
   }
 
 protected:
-  ndn::KeyChain m_keys;
-  const Name m_identityName;
   shared_ptr<ndn::IdentityCertificate> m_certificate;
   ndn::CommandInterestGenerator m_generator;
 };
@@ -82,7 +101,7 @@
   }
 };
 
-} //namespace tests
+} // namespace tests
 } // namespace nfd
 
-#endif // VALIDATION_COMMON_HPP
+#endif // NFD_TEST_MGMT_VALIDATION_COMMON_HPP
