diff --git a/tests/daemon/face/ethernet-transport.t.cpp b/tests/daemon/face/ethernet-transport.t.cpp
index 85c799d..1e02173 100644
--- a/tests/daemon/face/ethernet-transport.t.cpp
+++ b/tests/daemon/face/ethernet-transport.t.cpp
@@ -24,7 +24,7 @@
  */
 
 #include "face/ethernet-transport.hpp"
-#include "transport-properties.hpp"
+#include "transport-test-common.hpp"
 
 #include "network-interface-fixture.hpp"
 
diff --git a/tests/daemon/face/ethernet.t.cpp b/tests/daemon/face/ethernet.t.cpp
index 0098436..2b1d2de 100644
--- a/tests/daemon/face/ethernet.t.cpp
+++ b/tests/daemon/face/ethernet.t.cpp
@@ -34,6 +34,8 @@
 namespace nfd {
 namespace tests {
 
+using nfd::face::tests::NetworkInterfaceFixture;
+
 BOOST_AUTO_TEST_SUITE(Face)
 BOOST_FIXTURE_TEST_SUITE(TestEthernet, NetworkInterfaceFixture)
 
diff --git a/tests/daemon/face/get-available-interface-ip.hpp b/tests/daemon/face/get-available-interface-ip.hpp
new file mode 100644
index 0000000..feadabe
--- /dev/null
+++ b/tests/daemon/face/get-available-interface-ip.hpp
@@ -0,0 +1,93 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015,  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/>.
+ */
+
+#ifndef NFD_TESTS_DAEMON_FACE_GET_AVAILABLE_INTERFACE_IP_HPP
+#define NFD_TESTS_DAEMON_FACE_GET_AVAILABLE_INTERFACE_IP_HPP
+
+#include "core/network-interface.hpp"
+
+#define SKIP_IF_IP_UNAVAILABLE(address) \
+  do { \
+    if (address.is_unspecified()) { \
+      BOOST_WARN_MESSAGE(false, "skipping assertions that require a valid IP address"); \
+      return; \
+    } \
+  } while (false)
+
+namespace nfd {
+namespace face {
+namespace tests {
+
+/** \brief get a non-local IP address from any available network interface
+ *  \tparam A the address type, either boost::asio::ip::address_v4 or boost::asio::ip::address_v6
+ *  \return an IP address
+ *  \retval default-constructed A, if no address is available
+ */
+template<typename A>
+A
+getAvailableInterfaceIp();
+
+template<>
+boost::asio::ip::address_v4
+getAvailableInterfaceIp()
+{
+  for (const auto& interface : listNetworkInterfaces()) {
+    if (interface.isUp() && !interface.isLoopback()) {
+      for (const auto& address : interface.ipv4Addresses) {
+        if (!address.is_unspecified() &&
+            !address.is_loopback()) {
+          return address;
+        }
+      }
+    }
+  }
+
+  return {};
+}
+
+template<>
+boost::asio::ip::address_v6
+getAvailableInterfaceIp()
+{
+  for (const auto& interface : listNetworkInterfaces()) {
+    if (interface.isUp() && !interface.isLoopback()) {
+      for (const auto& address : interface.ipv6Addresses) {
+        if (!address.is_unspecified() &&
+            !address.is_link_local() && // see #1428
+            !address.is_loopback()) {
+          return address;
+        }
+      }
+    }
+  }
+
+  return {};
+}
+
+} // namespace tests
+} // namespace face
+} // namespace nfd
+
+#endif // NFD_TESTS_DAEMON_FACE_GET_AVAILABLE_INTERFACE_IP_HPP
diff --git a/tests/daemon/face/internal-face.t.cpp b/tests/daemon/face/internal-face.t.cpp
index 05e133f..cca385e 100644
--- a/tests/daemon/face/internal-face.t.cpp
+++ b/tests/daemon/face/internal-face.t.cpp
@@ -25,9 +25,8 @@
 
 #include "face/internal-face.hpp"
 #include "face/lp-face-wrapper.hpp"
-#include "transport-properties.hpp"
+#include "transport-test-common.hpp"
 
-#include "tests/test-common.hpp"
 #include "tests/identity-management-fixture.hpp"
 
 namespace nfd {
diff --git a/tests/daemon/face/multicast-udp-transport.t.cpp b/tests/daemon/face/multicast-udp-transport.t.cpp
index 457cb4a..545d4b8 100644
--- a/tests/daemon/face/multicast-udp-transport.t.cpp
+++ b/tests/daemon/face/multicast-udp-transport.t.cpp
@@ -24,9 +24,7 @@
  */
 
 #include "face/multicast-udp-transport.hpp"
-#include "transport-properties.hpp"
-
-#include "tests/test-common.hpp"
+#include "transport-test-common.hpp"
 
 namespace nfd {
 namespace face {
diff --git a/tests/daemon/face/network-interface-fixture.hpp b/tests/daemon/face/network-interface-fixture.hpp
index 3fb7af8..bb85ee7 100644
--- a/tests/daemon/face/network-interface-fixture.hpp
+++ b/tests/daemon/face/network-interface-fixture.hpp
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_TESTS_NETWORK_INTERFACE_FIXTURE_HPP
-#define NFD_TESTS_NETWORK_INTERFACE_FIXTURE_HPP
+#ifndef NFD_TESTS_DAEMON_FACE_NETWORK_INTERFACE_FIXTURE_HPP
+#define NFD_TESTS_DAEMON_FACE_NETWORK_INTERFACE_FIXTURE_HPP
 
 #include "core/network-interface.hpp"
 #include "face/ethernet-transport.hpp"
@@ -32,9 +32,10 @@
 #include "test-common.hpp"
 
 namespace nfd {
+namespace face {
 namespace tests {
 
-class NetworkInterfaceFixture : protected BaseFixture
+class NetworkInterfaceFixture : public nfd::tests::BaseFixture
 {
 protected:
   NetworkInterfaceFixture()
@@ -66,6 +67,7 @@
   } while (false)
 
 } // namespace tests
+} // namespace face
 } // namespace nfd
 
-#endif // NFD_TESTS_NETWORK_INTERFACE_FIXTURE_HPP
+#endif // NFD_TESTS_DAEMON_FACE_NETWORK_INTERFACE_FIXTURE_HPP
diff --git a/tests/daemon/face/null-face.t.cpp b/tests/daemon/face/null-face.t.cpp
index fbc5312..16d1a11 100644
--- a/tests/daemon/face/null-face.t.cpp
+++ b/tests/daemon/face/null-face.t.cpp
@@ -25,9 +25,7 @@
 
 #include "face/null-face.hpp"
 #include "face/lp-face-wrapper.hpp"
-#include "transport-properties.hpp"
-
-#include "tests/test-common.hpp"
+#include "transport-test-common.hpp"
 
 namespace nfd {
 namespace face {
diff --git a/tests/daemon/face/tcp-transport.t.cpp b/tests/daemon/face/tcp-transport.t.cpp
index a9d2fe1..873d6ca 100644
--- a/tests/daemon/face/tcp-transport.t.cpp
+++ b/tests/daemon/face/tcp-transport.t.cpp
@@ -24,9 +24,13 @@
  */
 
 #include "face/tcp-transport.hpp"
-#include "transport-properties.hpp"
+#include "face/lp-face.hpp"
 
-#include "tests/test-common.hpp"
+#include "dummy-receive-link-service.hpp"
+#include "get-available-interface-ip.hpp"
+#include "transport-test-common.hpp"
+
+#include "tests/limited-io.hpp"
 
 namespace nfd {
 namespace face {
@@ -37,42 +41,257 @@
 using ip::tcp;
 
 BOOST_AUTO_TEST_SUITE(Face)
-BOOST_FIXTURE_TEST_SUITE(TestTcpTransport, BaseFixture)
 
-BOOST_AUTO_TEST_CASE(StaticPropertiesIpv4)
+class TcpTransportFixture : public BaseFixture
 {
-  tcp::endpoint ep(ip::address_v4::loopback(), 7002);
-  tcp::acceptor acceptor(g_io, ep);
+protected:
+  TcpTransportFixture()
+    : transport(nullptr)
+    , remoteSocket(g_io)
+    , receivedPackets(nullptr)
+    , acceptor(g_io)
+  {
+  }
 
-  tcp::socket sock(g_io, tcp::endpoint(ip::address_v4::loopback(), 7001));
-  sock.connect(ep);
-  TcpTransport transport(std::move(sock), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
-  checkStaticPropertiesInitialized(transport);
+  void
+  initialize(ip::address address = ip::address_v4::loopback())
+  {
+    tcp::endpoint remoteEp(address, 7070);
+    acceptor.open(remoteEp.protocol());
+    acceptor.set_option(tcp::acceptor::reuse_address(true));
+    acceptor.bind(remoteEp);
+    acceptor.listen(1);
+    acceptor.async_accept(remoteSocket, bind([]{}));
 
-  BOOST_CHECK_EQUAL(transport.getLocalUri(), FaceUri("tcp4://127.0.0.1:7001"));
-  BOOST_CHECK_EQUAL(transport.getRemoteUri(), FaceUri("tcp4://127.0.0.1:7002"));
-  BOOST_CHECK_EQUAL(transport.getScope(), ndn::nfd::FACE_SCOPE_LOCAL);
-  BOOST_CHECK_EQUAL(transport.getPersistency(), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
-  BOOST_CHECK_EQUAL(transport.getLinkType(), ndn::nfd::LINK_TYPE_POINT_TO_POINT);
-  BOOST_CHECK_EQUAL(transport.getMtu(), MTU_UNLIMITED);
+    tcp::socket sock(g_io);
+    sock.async_connect(remoteEp, [this] (const boost::system::error_code& error) {
+      BOOST_REQUIRE_EQUAL(error, boost::system::errc::success);
+      limitedIo.afterOp();
+    });
+
+    BOOST_REQUIRE_EQUAL(limitedIo.run(1, time::seconds(1)), LimitedIo::EXCEED_OPS);
+
+    localEp = sock.local_endpoint();
+    face = make_unique<LpFace>(make_unique<DummyReceiveLinkService>(),
+                               make_unique<TcpTransport>(std::move(sock),
+                                                         ndn::nfd::FACE_PERSISTENCY_PERSISTENT));
+    transport = static_cast<TcpTransport*>(face->getTransport());
+    receivedPackets = &static_cast<DummyReceiveLinkService*>(face->getLinkService())->receivedPackets;
+
+    BOOST_REQUIRE_EQUAL(transport->getState(), TransportState::UP);
+  }
+
+  void
+  remoteWrite(const ndn::Buffer& buf)
+  {
+    // use write() because socket::send() does not guarantee that all data is written before returning
+    BOOST_REQUIRE_EQUAL(boost::asio::write(remoteSocket, boost::asio::buffer(buf)), buf.size());
+    limitedIo.defer(time::milliseconds(50));
+  }
+
+protected:
+  LimitedIo limitedIo;
+  TcpTransport* transport;
+  tcp::endpoint localEp;
+  tcp::socket remoteSocket;
+  std::vector<Transport::Packet>* receivedPackets;
+
+private:
+  tcp::acceptor acceptor;
+  unique_ptr<LpFace> face;
+};
+
+BOOST_FIXTURE_TEST_SUITE(TestTcpTransport, TcpTransportFixture)
+
+BOOST_AUTO_TEST_CASE(StaticPropertiesLocalIpv4)
+{
+  initialize();
+
+  checkStaticPropertiesInitialized(*transport);
+
+  BOOST_CHECK_EQUAL(transport->getLocalUri(), FaceUri("tcp4://127.0.0.1:" + to_string(localEp.port())));
+  BOOST_CHECK_EQUAL(transport->getRemoteUri(), FaceUri("tcp4://127.0.0.1:7070"));
+  BOOST_CHECK_EQUAL(transport->getScope(), ndn::nfd::FACE_SCOPE_LOCAL);
+  BOOST_CHECK_EQUAL(transport->getPersistency(), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
+  BOOST_CHECK_EQUAL(transport->getLinkType(), ndn::nfd::LINK_TYPE_POINT_TO_POINT);
+  BOOST_CHECK_EQUAL(transport->getMtu(), MTU_UNLIMITED);
 }
 
-BOOST_AUTO_TEST_CASE(StaticPropertiesIpv6)
+BOOST_AUTO_TEST_CASE(StaticPropertiesLocalIpv6)
 {
-  tcp::endpoint ep(ip::address_v6::loopback(), 7002);
-  tcp::acceptor acceptor(g_io, ep);
+  initialize(ip::address_v6::loopback());
 
-  tcp::socket sock(g_io, tcp::endpoint(ip::address_v6::loopback(), 7001));
-  sock.connect(ep);
-  TcpTransport transport(std::move(sock), ndn::nfd::FACE_PERSISTENCY_ON_DEMAND);
-  checkStaticPropertiesInitialized(transport);
+  checkStaticPropertiesInitialized(*transport);
 
-  BOOST_CHECK_EQUAL(transport.getLocalUri(), FaceUri("tcp6://[::1]:7001"));
-  BOOST_CHECK_EQUAL(transport.getRemoteUri(), FaceUri("tcp6://[::1]:7002"));
-  BOOST_CHECK_EQUAL(transport.getScope(), ndn::nfd::FACE_SCOPE_LOCAL);
-  BOOST_CHECK_EQUAL(transport.getPersistency(), ndn::nfd::FACE_PERSISTENCY_ON_DEMAND);
-  BOOST_CHECK_EQUAL(transport.getLinkType(), ndn::nfd::LINK_TYPE_POINT_TO_POINT);
-  BOOST_CHECK_EQUAL(transport.getMtu(), MTU_UNLIMITED);
+  BOOST_CHECK_EQUAL(transport->getLocalUri(), FaceUri("tcp6://[::1]:" + to_string(localEp.port())));
+  BOOST_CHECK_EQUAL(transport->getRemoteUri(), FaceUri("tcp6://[::1]:7070"));
+  BOOST_CHECK_EQUAL(transport->getScope(), ndn::nfd::FACE_SCOPE_LOCAL);
+  BOOST_CHECK_EQUAL(transport->getPersistency(), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
+  BOOST_CHECK_EQUAL(transport->getLinkType(), ndn::nfd::LINK_TYPE_POINT_TO_POINT);
+  BOOST_CHECK_EQUAL(transport->getMtu(), MTU_UNLIMITED);
+}
+
+BOOST_AUTO_TEST_CASE(StaticPropertiesNonLocalIpv4)
+{
+  auto address = getAvailableInterfaceIp<ip::address_v4>();
+  SKIP_IF_IP_UNAVAILABLE(address);
+  initialize(address);
+
+  checkStaticPropertiesInitialized(*transport);
+
+  BOOST_CHECK_EQUAL(transport->getLocalUri(),
+                    FaceUri("tcp4://" + address.to_string() + ":" + to_string(localEp.port())));
+  BOOST_CHECK_EQUAL(transport->getRemoteUri(),
+                    FaceUri("tcp4://" + address.to_string() + ":7070"));
+  BOOST_CHECK_EQUAL(transport->getScope(), ndn::nfd::FACE_SCOPE_NON_LOCAL);
+  BOOST_CHECK_EQUAL(transport->getPersistency(), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
+  BOOST_CHECK_EQUAL(transport->getLinkType(), ndn::nfd::LINK_TYPE_POINT_TO_POINT);
+  BOOST_CHECK_EQUAL(transport->getMtu(), MTU_UNLIMITED);
+}
+
+BOOST_AUTO_TEST_CASE(StaticPropertiesNonLocalIpv6)
+{
+  auto address = getAvailableInterfaceIp<ip::address_v6>();
+  SKIP_IF_IP_UNAVAILABLE(address);
+  initialize(address);
+
+  checkStaticPropertiesInitialized(*transport);
+
+  BOOST_CHECK_EQUAL(transport->getLocalUri(),
+                    FaceUri("tcp6://[" + address.to_string() + "]:" + to_string(localEp.port())));
+  BOOST_CHECK_EQUAL(transport->getRemoteUri(),
+                    FaceUri("tcp6://[" + address.to_string() + "]:7070"));
+  BOOST_CHECK_EQUAL(transport->getScope(), ndn::nfd::FACE_SCOPE_NON_LOCAL);
+  BOOST_CHECK_EQUAL(transport->getPersistency(), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
+  BOOST_CHECK_EQUAL(transport->getLinkType(), ndn::nfd::LINK_TYPE_POINT_TO_POINT);
+  BOOST_CHECK_EQUAL(transport->getMtu(), MTU_UNLIMITED);
+}
+
+BOOST_AUTO_TEST_CASE(Send)
+{
+  initialize();
+
+  auto block1 = ndn::encoding::makeStringBlock(300, "hello");
+  transport->send(Transport::Packet{Block{block1}}); // make a copy of the block
+  BOOST_CHECK_EQUAL(transport->getCounters().nOutPackets, 1);
+  BOOST_CHECK_EQUAL(transport->getCounters().nOutBytes, block1.size());
+
+  auto block2 = ndn::encoding::makeStringBlock(301, "world");
+  transport->send(Transport::Packet{Block{block2}}); // make a copy of the block
+  BOOST_CHECK_EQUAL(transport->getCounters().nOutPackets, 2);
+  BOOST_CHECK_EQUAL(transport->getCounters().nOutBytes, block1.size() + block2.size());
+
+  std::vector<uint8_t> readBuf(block1.size() + block2.size());
+  boost::asio::async_read(remoteSocket, boost::asio::buffer(readBuf),
+    [this] (const boost::system::error_code& error, size_t) {
+      BOOST_REQUIRE_EQUAL(error, boost::system::errc::success);
+      limitedIo.afterOp();
+    });
+
+  BOOST_REQUIRE_EQUAL(limitedIo.run(1, time::seconds(1)), LimitedIo::EXCEED_OPS);
+
+  BOOST_CHECK_EQUAL_COLLECTIONS(readBuf.begin(), readBuf.begin() + block1.size(), block1.begin(), block1.end());
+  BOOST_CHECK_EQUAL_COLLECTIONS(readBuf.begin() + block1.size(), readBuf.end(),   block2.begin(), block2.end());
+  BOOST_CHECK_EQUAL(transport->getState(), TransportState::UP);
+}
+
+BOOST_AUTO_TEST_CASE(ReceiveNormal)
+{
+  initialize();
+
+  Block pkt = ndn::encoding::makeStringBlock(300, "hello");
+  ndn::Buffer buf(pkt.begin(), pkt.end());
+  remoteWrite(buf);
+
+  BOOST_CHECK_EQUAL(transport->getCounters().nInPackets, 1);
+  BOOST_CHECK_EQUAL(transport->getCounters().nInBytes, pkt.size());
+  BOOST_CHECK_EQUAL(receivedPackets->size(), 1);
+  BOOST_CHECK_EQUAL(transport->getState(), TransportState::UP);
+}
+
+BOOST_AUTO_TEST_CASE(ReceiveMultipleSegments)
+{
+  initialize();
+
+  Block pkt = ndn::encoding::makeStringBlock(300, "hello");
+  ndn::Buffer buf1(pkt.begin(), pkt.end() - 2);
+  ndn::Buffer buf2(pkt.end() - 2, pkt.end());
+
+  remoteWrite(buf1);
+
+  BOOST_CHECK_EQUAL(transport->getCounters().nInPackets, 0);
+  BOOST_CHECK_EQUAL(transport->getCounters().nInBytes, 0);
+  BOOST_CHECK_EQUAL(receivedPackets->size(), 0);
+  BOOST_CHECK_EQUAL(transport->getState(), TransportState::UP);
+
+  remoteWrite(buf2);
+
+  BOOST_CHECK_EQUAL(transport->getCounters().nInPackets, 1);
+  BOOST_CHECK_EQUAL(transport->getCounters().nInBytes, pkt.size());
+  BOOST_CHECK_EQUAL(receivedPackets->size(), 1);
+  BOOST_CHECK_EQUAL(transport->getState(), TransportState::UP);
+}
+
+BOOST_AUTO_TEST_CASE(ReceiveMultipleBlocks)
+{
+  initialize();
+
+  Block pkt1 = ndn::encoding::makeStringBlock(300, "hello");
+  Block pkt2 = ndn::encoding::makeStringBlock(301, "world");
+  ndn::Buffer buf(pkt1.size() + pkt2.size());
+  std::copy(pkt1.begin(), pkt1.end(), buf.buf());
+  std::copy(pkt2.begin(), pkt2.end(), buf.buf() + pkt1.size());
+
+  remoteWrite(buf);
+
+  BOOST_CHECK_EQUAL(transport->getCounters().nInPackets, 2);
+  BOOST_CHECK_EQUAL(transport->getCounters().nInBytes, buf.size());
+  BOOST_CHECK_EQUAL(receivedPackets->size(), 2);
+  BOOST_CHECK_EQUAL(transport->getState(), TransportState::UP);
+}
+
+BOOST_AUTO_TEST_CASE(ReceiveTooLarge)
+{
+  initialize();
+
+  std::vector<uint8_t> bytes(ndn::MAX_NDN_PACKET_SIZE + 1, 0);
+  Block pkt = ndn::encoding::makeBinaryBlock(300, bytes.data(), bytes.size());
+  ndn::Buffer buf(pkt.begin(), pkt.end());
+
+  remoteWrite(buf);
+
+  BOOST_CHECK_EQUAL(transport->getCounters().nInPackets, 0);
+  BOOST_CHECK_EQUAL(transport->getCounters().nInBytes, 0);
+  BOOST_CHECK_EQUAL(receivedPackets->size(), 0);
+  BOOST_CHECK_EQUAL(transport->getState(), TransportState::CLOSED);
+}
+
+BOOST_AUTO_TEST_CASE(Close)
+{
+  initialize();
+
+  transport->close();
+  BOOST_CHECK_EQUAL(transport->getState(), TransportState::CLOSING);
+
+  g_io.poll();
+  BOOST_CHECK_EQUAL(transport->getState(), TransportState::CLOSED);
+}
+
+BOOST_AUTO_TEST_CASE(RemoteClose)
+{
+  initialize();
+
+  transport->afterStateChange.connectSingleShot([this] (TransportState oldState, TransportState newState) {
+    BOOST_CHECK_EQUAL(oldState, TransportState::UP);
+    BOOST_CHECK_EQUAL(newState, TransportState::FAILED);
+    limitedIo.afterOp();
+  });
+
+  remoteSocket.close();
+  BOOST_REQUIRE_EQUAL(limitedIo.run(1, time::seconds(1)), LimitedIo::EXCEED_OPS);
+
+  g_io.poll();
+  BOOST_CHECK_EQUAL(transport->getState(), TransportState::CLOSED);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestTcpTransport
diff --git a/tests/daemon/face/transport-properties.hpp b/tests/daemon/face/transport-test-common.hpp
similarity index 92%
rename from tests/daemon/face/transport-properties.hpp
rename to tests/daemon/face/transport-test-common.hpp
index 50a9666..16b9038 100644
--- a/tests/daemon/face/transport-properties.hpp
+++ b/tests/daemon/face/transport-test-common.hpp
@@ -23,11 +23,10 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_TESTS_DAEMON_FACE_TRANSPORT_PROPERTIES_HPP
-#define NFD_TESTS_DAEMON_FACE_TRANSPORT_PROPERTIES_HPP
+#ifndef NFD_TESTS_DAEMON_FACE_TRANSPORT_TEST_COMMON_HPP
+#define NFD_TESTS_DAEMON_FACE_TRANSPORT_TEST_COMMON_HPP
 
 #include "face/transport.hpp"
-
 #include "tests/test-common.hpp"
 
 namespace nfd {
@@ -56,4 +55,4 @@
 } // namespace face
 } // namespace nfd
 
-#endif // NFD_TESTS_DAEMON_FACE_TRANSPORT_PROPERTIES_HPP
+#endif // NFD_TESTS_DAEMON_FACE_TRANSPORT_TEST_COMMON_HPP
diff --git a/tests/daemon/face/transport.t.cpp b/tests/daemon/face/transport.t.cpp
index ae6a9c1..8189859 100644
--- a/tests/daemon/face/transport.t.cpp
+++ b/tests/daemon/face/transport.t.cpp
@@ -27,7 +27,7 @@
 #include "face/lp-face.hpp"
 #include "dummy-transport.hpp"
 #include "dummy-receive-link-service.hpp"
-#include "transport-properties.hpp"
+#include "transport-test-common.hpp"
 
 #include <boost/mpl/empty_sequence.hpp>
 #include <boost/mpl/int.hpp>
@@ -36,8 +36,6 @@
 #include <boost/mpl/set.hpp>
 #include <boost/mpl/transform_view.hpp>
 
-#include "tests/test-common.hpp"
-
 namespace nfd {
 namespace face {
 namespace tests {
diff --git a/tests/daemon/face/unicast-udp-transport.t.cpp b/tests/daemon/face/unicast-udp-transport.t.cpp
index 81ccc84..90f0a40 100644
--- a/tests/daemon/face/unicast-udp-transport.t.cpp
+++ b/tests/daemon/face/unicast-udp-transport.t.cpp
@@ -24,9 +24,7 @@
  */
 
 #include "face/unicast-udp-transport.hpp"
-#include "transport-properties.hpp"
-
-#include "tests/test-common.hpp"
+#include "transport-test-common.hpp"
 
 namespace nfd {
 namespace face {
diff --git a/tests/daemon/face/unix-stream-transport.t.cpp b/tests/daemon/face/unix-stream-transport.t.cpp
index 32142eb..a74b760 100644
--- a/tests/daemon/face/unix-stream-transport.t.cpp
+++ b/tests/daemon/face/unix-stream-transport.t.cpp
@@ -24,9 +24,8 @@
  */
 
 #include "face/unix-stream-transport.hpp"
-#include "transport-properties.hpp"
+#include "transport-test-common.hpp"
 
-#include "tests/test-common.hpp"
 #include <boost/filesystem.hpp>
 
 namespace nfd {
diff --git a/tests/daemon/face/websocket-transport.t.cpp b/tests/daemon/face/websocket-transport.t.cpp
index 8c295ba..ca9bd72 100644
--- a/tests/daemon/face/websocket-transport.t.cpp
+++ b/tests/daemon/face/websocket-transport.t.cpp
@@ -26,9 +26,8 @@
 #include "face/websocket-transport.hpp"
 #include "face/lp-face.hpp"
 #include "dummy-receive-link-service.hpp"
-#include "transport-properties.hpp"
+#include "transport-test-common.hpp"
 
-#include "tests/test-common.hpp"
 #include "tests/limited-io.hpp"
 
 namespace nfd {
