diff --git a/tests/test-common.cpp b/tests/test-common.cpp
new file mode 100644
index 0000000..0f4a77b
--- /dev/null
+++ b/tests/test-common.cpp
@@ -0,0 +1,132 @@
+/* -*- 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 "test-common.hpp"
+#include <ndn-cxx/security/signature-sha256-with-rsa.hpp>
+
+namespace nfd {
+namespace tests {
+
+BaseFixture::BaseFixture()
+  : g_io(getGlobalIoService())
+{
+}
+
+BaseFixture::~BaseFixture()
+{
+  resetGlobalIoService();
+}
+
+UnitTestTimeFixture::UnitTestTimeFixture()
+  : steadyClock(make_shared<time::UnitTestSteadyClock>())
+  , systemClock(make_shared<time::UnitTestSystemClock>())
+{
+  time::setCustomClocks(steadyClock, systemClock);
+}
+
+UnitTestTimeFixture::~UnitTestTimeFixture()
+{
+  time::setCustomClocks(nullptr, nullptr);
+}
+
+void
+UnitTestTimeFixture::advanceClocks(const time::nanoseconds& tick, size_t nTicks)
+{
+  this->advanceClocks(tick, tick * nTicks);
+}
+
+void
+UnitTestTimeFixture::advanceClocks(const time::nanoseconds& tick, const time::nanoseconds& total)
+{
+  BOOST_ASSERT(tick > time::nanoseconds::zero());
+  BOOST_ASSERT(total >= time::nanoseconds::zero());
+
+  time::nanoseconds remaining = total;
+  while (remaining > time::nanoseconds::zero()) {
+    if (remaining >= tick) {
+      steadyClock->advance(tick);
+      systemClock->advance(tick);
+      remaining -= tick;
+    }
+    else {
+      steadyClock->advance(remaining);
+      systemClock->advance(remaining);
+      remaining = time::nanoseconds::zero();
+    }
+
+    if (g_io.stopped())
+      g_io.reset();
+    g_io.poll();
+  }
+}
+
+shared_ptr<Interest>
+makeInterest(const Name& name, uint32_t nonce)
+{
+  auto interest = make_shared<Interest>(name);
+  if (nonce != 0) {
+    interest->setNonce(nonce);
+  }
+  return interest;
+}
+
+shared_ptr<Data>
+makeData(const Name& name)
+{
+  auto data = make_shared<Data>(name);
+  return signData(data);
+}
+
+Data&
+signData(Data& data)
+{
+  ndn::SignatureSha256WithRsa fakeSignature;
+  fakeSignature.setValue(ndn::encoding::makeEmptyBlock(tlv::SignatureValue));
+  data.setSignature(fakeSignature);
+  data.wireEncode();
+
+  return data;
+}
+
+shared_ptr<Link>
+makeLink(const Name& name, std::initializer_list<std::pair<uint32_t, Name>> delegations)
+{
+  auto link = make_shared<Link>(name, delegations);
+  signData(link);
+  return link;
+}
+
+lp::Nack
+makeNack(const Name& name, uint32_t nonce, lp::NackReason reason)
+{
+  Interest interest(name);
+  interest.setNonce(nonce);
+  lp::Nack nack(std::move(interest));
+  nack.setReason(reason);
+  return nack;
+}
+
+} // namespace tests
+} // namespace nfd
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index fea503b..57727da 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -32,7 +32,6 @@
 #include "core/logger.hpp"
 
 #include <ndn-cxx/util/time-unit-test-clock.hpp>
-#include <ndn-cxx/security/key-chain.hpp>
 
 #ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
 #include <unistd.h>
@@ -58,18 +57,13 @@
 class BaseFixture
 {
 protected:
-  BaseFixture()
-    : g_io(getGlobalIoService())
-  {
-  }
+  BaseFixture();
 
-  ~BaseFixture()
-  {
-    resetGlobalIoService();
-  }
+  ~BaseFixture();
 
 protected:
-  /// reference to global io_service
+  /** \brief reference to global io_service
+   */
   boost::asio::io_service& g_io;
 };
 
@@ -78,17 +72,9 @@
 class UnitTestTimeFixture : public virtual BaseFixture
 {
 protected:
-  UnitTestTimeFixture()
-    : steadyClock(make_shared<time::UnitTestSteadyClock>())
-    , systemClock(make_shared<time::UnitTestSystemClock>())
-  {
-    time::setCustomClocks(steadyClock, systemClock);
-  }
+  UnitTestTimeFixture();
 
-  ~UnitTestTimeFixture()
-  {
-    time::setCustomClocks(nullptr, nullptr);
-  }
+  ~UnitTestTimeFixture();
 
   /** \brief advance steady and system clocks
    *
@@ -99,10 +85,7 @@
    *  Clock advancing would stop in case of an exception.
    */
   void
-  advanceClocks(const time::nanoseconds& tick, size_t nTicks = 1)
-  {
-    this->advanceClocks(tick, tick * nTicks);
-  }
+  advanceClocks(const time::nanoseconds& tick, size_t nTicks = 1);
 
   /** \brief advance steady and system clocks
    *
@@ -114,82 +97,58 @@
    *  Clock advancing would stop in case of an exception.
    */
   void
-  advanceClocks(const time::nanoseconds& tick, const time::nanoseconds& total)
-  {
-    BOOST_ASSERT(tick > time::nanoseconds::zero());
-    BOOST_ASSERT(total >= time::nanoseconds::zero());
-
-    time::nanoseconds remaining = total;
-    while (remaining > time::nanoseconds::zero()) {
-      if (remaining >= tick) {
-        steadyClock->advance(tick);
-        systemClock->advance(tick);
-        remaining -= tick;
-      }
-      else {
-        steadyClock->advance(remaining);
-        systemClock->advance(remaining);
-        remaining = time::nanoseconds::zero();
-      }
-
-      if (g_io.stopped())
-        g_io.reset();
-      g_io.poll();
-    }
-  }
-
-  friend class LimitedIo;
+  advanceClocks(const time::nanoseconds& tick, const time::nanoseconds& total);
 
 protected:
   shared_ptr<time::UnitTestSteadyClock> steadyClock;
   shared_ptr<time::UnitTestSystemClock> systemClock;
+
+  friend class LimitedIo;
 };
 
-inline shared_ptr<Interest>
-makeInterest(const Name& name, uint32_t nonce = 0)
-{
-  auto interest = make_shared<Interest>(name);
-  if (nonce != 0) {
-    interest->setNonce(nonce);
-  }
-  return interest;
-}
+/** \brief create an Interest
+ *  \param name Interest name
+ *  \param nonce if non-zero, set Nonce to this value
+ *               (useful for creating Nack with same Nonce)
+ */
+shared_ptr<Interest>
+makeInterest(const Name& name, uint32_t nonce = 0);
 
+/** \brief create a Data with fake signature
+ *  \note Data may be modified afterwards without losing the fake signature.
+ *        If a real signature is desired, sign again with KeyChain.
+ */
+shared_ptr<Data>
+makeData(const Name& name);
+
+/** \brief add a fake signature to Data
+ */
+Data&
+signData(Data& data);
+
+/** \brief add a fake signature to Data
+ */
 inline shared_ptr<Data>
 signData(shared_ptr<Data> data)
 {
-  ndn::SignatureSha256WithRsa fakeSignature;
-  fakeSignature.setValue(ndn::encoding::makeEmptyBlock(tlv::SignatureValue));
-  data->setSignature(fakeSignature);
-  data->wireEncode();
-
+  signData(*data);
   return data;
 }
 
-inline shared_ptr<Data>
-makeData(const Name& name)
-{
-  auto data = make_shared<Data>(name);
-  return signData(data);
-}
+/** \brief create a Link object with fake signature
+ *  \note Link may be modified afterwards without losing the fake signature.
+ *        If a real signature is desired, sign again with KeyChain.
+ */
+shared_ptr<Link>
+makeLink(const Name& name, std::initializer_list<std::pair<uint32_t, Name>> delegations);
 
-inline shared_ptr<Link>
-makeLink(const Name& name, std::initializer_list<std::pair<uint32_t, Name>> delegations)
-{
-  auto link = make_shared<Link>(name, delegations);
-  signData(link);
-  return link;
-}
-
-inline lp::Nack
-makeNack(const Name& name, uint32_t nonce, lp::NackReason reason)
-{
-  Interest interest(name);
-  interest.setNonce(nonce);
-  lp::Nack nack(std::move(interest));
-  nack.setReason(reason);
-  return nack;
-}
+/** \brief create a Nack
+ *  \param name Interest name
+ *  \param nonce Interest nonce
+ *  \param reason Nack reason
+ */
+lp::Nack
+makeNack(const Name& name, uint32_t nonce, lp::NackReason reason);
 
 } // namespace tests
 } // namespace nfd
