face: reimplement EndpointId with std::variant

Refs: #5041
Change-Id: Ib8aced49a7aa14b137fb06de4a0ae8b979f07587
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)