diff --git a/tests/daemon/face/datagram-transport.t.cpp b/tests/daemon/face/datagram-transport.t.cpp
index 055584c..4e88ff2 100644
--- a/tests/daemon/face/datagram-transport.t.cpp
+++ b/tests/daemon/face/datagram-transport.t.cpp
@@ -82,8 +82,12 @@
   BOOST_REQUIRE_EQUAL(this->receivedPackets->size(), 2);
   BOOST_CHECK(this->receivedPackets->at(0).packet == pkt1);
   BOOST_CHECK(this->receivedPackets->at(1).packet == pkt2);
-  BOOST_CHECK_EQUAL(this->receivedPackets->at(0).endpoint,
-                    this->receivedPackets->at(1).endpoint);
+  BOOST_CHECK(this->receivedPackets->at(0).endpoint == this->receivedPackets->at(1).endpoint);
+  // check that the endpoint is empty (monostate) if and only if the transport is unicast
+  constexpr bool isUnicast = std::is_same_v<typename std::remove_pointer_t<decltype(T::transport)>::addressing,
+                                            face::Unicast>;
+  BOOST_CHECK_EQUAL(std::holds_alternative<std::monostate>(this->receivedPackets->at(0).endpoint),
+                    isUnicast);
 }
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(ReceiveIncomplete, T, DatagramTransportFixtures, T)
diff --git a/tests/daemon/face/dummy-face.hpp b/tests/daemon/face/dummy-face.hpp
index 8374430..15ab445 100644
--- a/tests/daemon/face/dummy-face.hpp
+++ b/tests/daemon/face/dummy-face.hpp
@@ -60,17 +60,17 @@
   /** \brief causes the face to receive an Interest
    */
   void
-  receiveInterest(const Interest& interest, const EndpointId& endpointId);
+  receiveInterest(const Interest& interest, const EndpointId& endpointId = {});
 
   /** \brief causes the face to receive a Data
    */
   void
-  receiveData(const Data& data, const EndpointId& endpointId);
+  receiveData(const Data& data, const EndpointId& endpointId = {});
 
   /** \brief causes the face to receive a Nack
    */
   void
-  receiveNack(const lp::Nack& nack, const EndpointId& endpointId);
+  receiveNack(const lp::Nack& nack, const EndpointId& endpointId = {});
 
   /** \brief Emitted after a network-layer packet is sent.
    *
diff --git a/tests/daemon/face/face-endpoint.t.cpp b/tests/daemon/face/face-endpoint.t.cpp
new file mode 100644
index 0000000..123a0f9
--- /dev/null
+++ b/tests/daemon/face/face-endpoint.t.cpp
@@ -0,0 +1,62 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2014-2022,  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 "face/face-endpoint.hpp"
+
+#include "tests/test-common.hpp"
+#include "dummy-face.hpp"
+
+#include <boost/lexical_cast.hpp>
+
+namespace nfd::tests {
+
+using namespace nfd::face;
+
+BOOST_AUTO_TEST_SUITE(Face)
+BOOST_AUTO_TEST_SUITE(TestFaceEndpoint)
+
+BOOST_AUTO_TEST_CASE(Print)
+{
+  DummyFace face;
+  FaceEndpoint faceEndpoint1(face);
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(faceEndpoint1), "0");
+
+  ethernet::Address ethEp{0x01, 0x00, 0x5e, 0x90, 0x10, 0x01};
+  FaceEndpoint faceEndpoint2(face, ethEp);
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(faceEndpoint2), "(0, 01:00:5e:90:10:01)");
+
+  udp::Endpoint udp4Ep{boost::asio::ip::address_v4(0xe00017aa), 56363};
+  FaceEndpoint faceEndpoint3(face, udp4Ep);
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(faceEndpoint3), "(0, 224.0.23.170:56363)");
+
+  udp::Endpoint udp6Ep{boost::asio::ip::address_v6::loopback(), 12345};
+  FaceEndpoint faceEndpoint4(face, udp6Ep);
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(faceEndpoint4), "(0, [::1]:12345)");
+}
+
+BOOST_AUTO_TEST_SUITE_END() // TestFaceEndpoint
+BOOST_AUTO_TEST_SUITE_END() // Face
+
+} // namespace nfd::tests
diff --git a/tests/daemon/face/face.t.cpp b/tests/daemon/face/face.t.cpp
index 34a19a7..8b8448d 100644
--- a/tests/daemon/face/face.t.cpp
+++ b/tests/daemon/face/face.t.cpp
@@ -104,16 +104,16 @@
   face1->afterReceiveNack.connect([&] (auto&&...) { ++nReceivedNacks; });
 
   for (size_t i = 0; i < nInInterests; ++i) {
-    face1->receiveInterest(*makeInterest("/JSQdqward4"), 0);
+    face1->receiveInterest(*makeInterest("/JSQdqward4"));
   }
 
   for (size_t i = 0; i < nInData; ++i) {
-    face1->receiveData(*makeData("/hT8FDigWn1"), 0);
+    face1->receiveData(*makeData("/hT8FDigWn1"));
   }
 
   for (size_t i = 0; i < nInNacks; ++i) {
     face1->receiveNack(makeNack(*makeInterest("/StnEVTj4Ex", false, std::nullopt, 561),
-                                lp::NackReason::CONGESTION), 0);
+                                lp::NackReason::CONGESTION));
   }
 
   for (size_t i = 0; i < nOutInterests; ++i) {
diff --git a/tests/daemon/face/lp-reassembler.t.cpp b/tests/daemon/face/lp-reassembler.t.cpp
index 16a3592..073c3db 100644
--- a/tests/daemon/face/lp-reassembler.t.cpp
+++ b/tests/daemon/face/lp-reassembler.t.cpp
@@ -38,7 +38,7 @@
   LpReassemblerFixture()
   {
     reassembler.beforeTimeout.connect(
-      [this] (EndpointId remoteEp, size_t nDroppedFragments) {
+      [this] (const EndpointId& remoteEp, size_t nDroppedFragments) {
         timeoutHistory.emplace_back(remoteEp, nDroppedFragments);
       });
   }
@@ -72,7 +72,7 @@
   bool isComplete = false;
   Block netPacket;
   lp::Packet packet;
-  std::tie(isComplete, netPacket, packet) = reassembler.receiveFragment(0, received);
+  std::tie(isComplete, netPacket, packet) = reassembler.receiveFragment({}, received);
 
   BOOST_REQUIRE(isComplete);
   BOOST_CHECK(packet.has<lp::NextHopFaceIdField>());
@@ -93,7 +93,7 @@
   bool isComplete = false;
   Block netPacket;
   lp::Packet packet;
-  std::tie(isComplete, netPacket, packet) = reassembler.receiveFragment(0, received);
+  std::tie(isComplete, netPacket, packet) = reassembler.receiveFragment({}, received);
 
   BOOST_REQUIRE(isComplete);
   BOOST_CHECK(packet.has<lp::NextHopFaceIdField>());
@@ -113,7 +113,7 @@
   bool isComplete = false;
   Block netPacket;
   lp::Packet packet;
-  std::tie(isComplete, netPacket, packet) = reassembler.receiveFragment(0, received);
+  std::tie(isComplete, netPacket, packet) = reassembler.receiveFragment({}, received);
 
   BOOST_REQUIRE(isComplete);
   BOOST_CHECK(packet.has<lp::NextHopFaceIdField>());
@@ -132,7 +132,7 @@
   bool isComplete = false;
   Block netPacket;
   lp::Packet packet;
-  std::tie(isComplete, netPacket, packet) = reassembler.receiveFragment(0, received);
+  std::tie(isComplete, netPacket, packet) = reassembler.receiveFragment({}, received);
 
   BOOST_REQUIRE(isComplete);
   BOOST_CHECK(packet.has<lp::NextHopFaceIdField>());
@@ -172,15 +172,15 @@
   Block netPacket;
   lp::Packet packet;
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received1);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received1);
+  BOOST_TEST(!isComplete);
   BOOST_CHECK_EQUAL(reassembler.size(), 1);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received2);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received2);
+  BOOST_TEST(!isComplete);
   BOOST_CHECK_EQUAL(reassembler.size(), 1);
 
-  std::tie(isComplete, netPacket, packet) = reassembler.receiveFragment(0, received3);
+  std::tie(isComplete, netPacket, packet) = reassembler.receiveFragment({}, received3);
   BOOST_REQUIRE(isComplete);
   BOOST_CHECK(packet.has<lp::NextHopFaceIdField>());
   BOOST_CHECK_EQUAL_COLLECTIONS(data, data + sizeof(data), netPacket.begin(), netPacket.end());
@@ -215,13 +215,13 @@
   Block netPacket;
   lp::Packet packet;
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received1);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received1);
+  BOOST_TEST(!isComplete);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received2);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received2);
+  BOOST_TEST(!isComplete);
 
-  std::tie(isComplete, netPacket, packet) = reassembler.receiveFragment(0, received3);
+  std::tie(isComplete, netPacket, packet) = reassembler.receiveFragment({}, received3);
   BOOST_REQUIRE(isComplete);
   BOOST_CHECK(packet.has<lp::NextHopFaceIdField>());
   BOOST_CHECK_EQUAL_COLLECTIONS(data, data + sizeof(data), netPacket.begin(), netPacket.end());
@@ -254,14 +254,14 @@
 
   bool isComplete = false;
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, frag2);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, frag2);
+  BOOST_TEST(!isComplete);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, frag0);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, frag0);
+  BOOST_TEST(!isComplete);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, frag1);
-  BOOST_REQUIRE(isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, frag1);
+  BOOST_TEST(isComplete);
 }
 
 BOOST_AUTO_TEST_CASE(Duplicate)
@@ -276,11 +276,11 @@
 
   bool isComplete = false;
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, frag0);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, frag0);
+  BOOST_TEST(!isComplete);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(1, frag0);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, frag0);
+  BOOST_TEST(!isComplete);
 }
 
 BOOST_AUTO_TEST_CASE(Timeout)
@@ -301,21 +301,21 @@
   received2.add<lp::FragCountField>(2);
   received2.add<lp::SequenceField>(1001);
 
-  const EndpointId REMOTE_EP = 11028;
+  const EndpointId REMOTE_EP = ethernet::getDefaultMulticastAddress();
   bool isComplete = false;
   std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(REMOTE_EP, received1);
-  BOOST_REQUIRE(!isComplete);
+  BOOST_TEST(!isComplete);
   BOOST_CHECK_EQUAL(reassembler.size(), 1);
   BOOST_CHECK(timeoutHistory.empty());
 
   advanceClocks(1_ms, 600);
   BOOST_CHECK_EQUAL(reassembler.size(), 0);
   BOOST_REQUIRE_EQUAL(timeoutHistory.size(), 1);
-  BOOST_CHECK_EQUAL(std::get<0>(timeoutHistory.back()), REMOTE_EP);
+  BOOST_CHECK(std::get<0>(timeoutHistory.back()) == REMOTE_EP);
   BOOST_CHECK_EQUAL(std::get<1>(timeoutHistory.back()), 1);
 
   std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(REMOTE_EP, received2);
-  BOOST_REQUIRE(!isComplete);
+  BOOST_TEST(!isComplete);
 }
 
 BOOST_AUTO_TEST_CASE(MissingSequence)
@@ -344,19 +344,19 @@
 
   bool isComplete = false;
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received1);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received1);
+  BOOST_TEST(!isComplete);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received2);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received2);
+  BOOST_TEST(!isComplete);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received3);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received3);
+  BOOST_TEST(!isComplete);
 
   advanceClocks(1_ms, 600);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received2);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received2);
+  BOOST_TEST(!isComplete);
 }
 
 BOOST_AUTO_TEST_CASE(FragCountOverLimit)
@@ -372,8 +372,8 @@
 
   bool isComplete = false;
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received1);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received1);
+  BOOST_TEST(!isComplete);
 }
 
 BOOST_AUTO_TEST_CASE(MissingFragCount)
@@ -403,14 +403,14 @@
 
   bool isComplete = false;
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received1);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received1);
+  BOOST_TEST(!isComplete);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received2);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received2);
+  BOOST_TEST(!isComplete);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received3);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received3);
+  BOOST_TEST(!isComplete);
 }
 
 BOOST_AUTO_TEST_CASE(OverFragCount)
@@ -444,14 +444,14 @@
 
   bool isComplete = false;
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received1);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received1);
+  BOOST_TEST(!isComplete);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received2);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received2);
+  BOOST_TEST(!isComplete);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(0, received3);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment({}, received3);
+  BOOST_TEST(!isComplete);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // MultiFragment
@@ -491,20 +491,23 @@
 
   bool isComplete = false;
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(1, frag1_1);
-  BOOST_REQUIRE(!isComplete);
+  const EndpointId REMOTE_EP_1 = ethernet::Address::fromString("11:22:33:45:67:89");
+  const EndpointId REMOTE_EP_2 = ethernet::Address::fromString("11:22:33:ab:cd:ef");
+
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(REMOTE_EP_1, frag1_1);
+  BOOST_TEST(!isComplete);
   BOOST_CHECK_EQUAL(reassembler.size(), 1);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(2, frag2_2);
-  BOOST_REQUIRE(!isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(REMOTE_EP_2, frag2_2);
+  BOOST_TEST(!isComplete);
   BOOST_CHECK_EQUAL(reassembler.size(), 2);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(1, frag1_2);
-  BOOST_REQUIRE(isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(REMOTE_EP_1, frag1_2);
+  BOOST_TEST(isComplete);
   BOOST_CHECK_EQUAL(reassembler.size(), 1);
 
-  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(2, frag2_1);
-  BOOST_REQUIRE(isComplete);
+  std::tie(isComplete, std::ignore, std::ignore) = reassembler.receiveFragment(REMOTE_EP_2, frag2_1);
+  BOOST_TEST(isComplete);
   BOOST_CHECK_EQUAL(reassembler.size(), 0);
 }
 
diff --git a/tests/daemon/face/multicast-udp-transport.t.cpp b/tests/daemon/face/multicast-udp-transport.t.cpp
index f32d30f..efdd4f2 100644
--- a/tests/daemon/face/multicast-udp-transport.t.cpp
+++ b/tests/daemon/face/multicast-udp-transport.t.cpp
@@ -72,7 +72,7 @@
   BOOST_CHECK_EQUAL(transport->canChangePersistencyTo(ndn::nfd::FACE_PERSISTENCY_PERMANENT), true);
 }
 
-BOOST_FIXTURE_TEST_CASE_TEMPLATE(ReceiveMultipleRemoteEndpoints, T, MulticastUdpTransportFixtures, T)
+BOOST_FIXTURE_TEST_CASE_TEMPLATE(ReceiveFromMultipleEndpoints, T, MulticastUdpTransportFixtures, T)
 {
   TRANSPORT_TEST_INIT();
 
@@ -93,8 +93,8 @@
   BOOST_CHECK_EQUAL(this->transport->getState(), TransportState::UP);
 
   BOOST_REQUIRE_EQUAL(this->receivedPackets->size(), 2);
-  BOOST_CHECK_EQUAL(this->receivedPackets->at(0).endpoint,
-                    this->receivedPackets->at(1).endpoint);
+  BOOST_CHECK(this->receivedPackets->at(0).endpoint == this->receivedPackets->at(1).endpoint);
+  BOOST_CHECK(std::holds_alternative<nfd::udp::Endpoint>(this->receivedPackets->at(0).endpoint));
 
   this->sendToGroup(remoteSockTx2, buf1);
   this->sendToGroup(remoteSockTx2, buf2);
@@ -105,10 +105,11 @@
   BOOST_CHECK_EQUAL(this->transport->getState(), TransportState::UP);
 
   BOOST_REQUIRE_EQUAL(this->receivedPackets->size(), 4);
-  BOOST_CHECK_EQUAL(this->receivedPackets->at(2).endpoint,
-                    this->receivedPackets->at(3).endpoint);
-  BOOST_CHECK_NE(this->receivedPackets->at(0).endpoint,
-                 this->receivedPackets->at(2).endpoint);
+  EndpointId epId2(remoteSockTx2.local_endpoint());
+  BOOST_CHECK(this->receivedPackets->at(0).endpoint != epId2);
+  BOOST_CHECK(this->receivedPackets->at(1).endpoint != epId2);
+  BOOST_CHECK(this->receivedPackets->at(2).endpoint == epId2);
+  BOOST_CHECK(this->receivedPackets->at(3).endpoint == epId2);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestMulticastUdpTransport
diff --git a/tests/daemon/face/stream-transport.t.cpp b/tests/daemon/face/stream-transport.t.cpp
index 9c13653..2acacfb 100644
--- a/tests/daemon/face/stream-transport.t.cpp
+++ b/tests/daemon/face/stream-transport.t.cpp
@@ -93,8 +93,8 @@
   BOOST_REQUIRE_EQUAL(this->receivedPackets->size(), 2);
   BOOST_CHECK(this->receivedPackets->at(0).packet == pkt1);
   BOOST_CHECK(this->receivedPackets->at(1).packet == pkt2);
-  BOOST_CHECK_EQUAL(this->receivedPackets->at(0).endpoint, 0);
-  BOOST_CHECK_EQUAL(this->receivedPackets->at(1).endpoint, 0);
+  BOOST_CHECK(this->receivedPackets->at(0).endpoint == EndpointId{});
+  BOOST_CHECK(this->receivedPackets->at(1).endpoint == EndpointId{});
 }
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(ReceiveMultipleSegments, T, StreamTransportFixtures, T)
diff --git a/tests/daemon/face/websocket-transport.t.cpp b/tests/daemon/face/websocket-transport.t.cpp
index fe79de9..e8733b2 100644
--- a/tests/daemon/face/websocket-transport.t.cpp
+++ b/tests/daemon/face/websocket-transport.t.cpp
@@ -166,8 +166,8 @@
   BOOST_REQUIRE_EQUAL(this->serverReceivedPackets->size(), 2);
   BOOST_CHECK(this->serverReceivedPackets->at(0).packet == pkt1);
   BOOST_CHECK(this->serverReceivedPackets->at(1).packet == pkt2);
-  BOOST_CHECK_EQUAL(this->serverReceivedPackets->at(0).endpoint, 0);
-  BOOST_CHECK_EQUAL(this->serverReceivedPackets->at(1).endpoint, 0);
+  BOOST_CHECK(this->serverReceivedPackets->at(0).endpoint == EndpointId{});
+  BOOST_CHECK(this->serverReceivedPackets->at(1).endpoint == EndpointId{});
 }
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(ReceiveMalformed, T, WebSocketTransportFixtures, T)
