diff --git a/tests/daemon/face/stream-transport.t.cpp b/tests/daemon/face/stream-transport.t.cpp
index 24b8b43..89470de 100644
--- a/tests/daemon/face/stream-transport.t.cpp
+++ b/tests/daemon/face/stream-transport.t.cpp
@@ -26,6 +26,8 @@
 #include "tcp-transport-fixture.hpp"
 #include "unix-stream-transport-fixture.hpp"
 
+#include <boost/mpl/vector.hpp>
+
 namespace nfd {
 namespace face {
 namespace tests {
@@ -122,27 +124,67 @@
 {
   this->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());
+  std::vector<uint8_t> bytes(ndn::MAX_NDN_PACKET_SIZE, 0);
+  Block pkt1 = ndn::encoding::makeBinaryBlock(300, bytes.data(), bytes.size() - 6);
+  ndn::Buffer buf1(pkt1.begin(), pkt1.end());
+  BOOST_REQUIRE_EQUAL(buf1.size(), ndn::MAX_NDN_PACKET_SIZE);
 
-  this->remoteWrite(buf, false);
+  Block pkt2 = ndn::encoding::makeBinaryBlock(301, bytes.data(), bytes.size());
+  ndn::Buffer buf2(pkt2.begin(), pkt2.end());
+  BOOST_REQUIRE_GT(buf2.size(), ndn::MAX_NDN_PACKET_SIZE);
 
-  BOOST_CHECK_EQUAL(this->transport->getCounters().nInPackets, 0);
-  BOOST_CHECK_EQUAL(this->transport->getCounters().nInBytes, 0);
-  BOOST_CHECK_EQUAL(this->receivedPackets->size(), 0);
-  BOOST_CHECK_EQUAL(this->transport->getState(), TransportState::CLOSED);
+  this->remoteWrite(buf1); // this should succeed
+
+  BOOST_CHECK_EQUAL(this->transport->getCounters().nInPackets, 1);
+  BOOST_CHECK_EQUAL(this->transport->getCounters().nInBytes, buf1.size());
+  BOOST_CHECK_EQUAL(this->receivedPackets->size(), 1);
+  BOOST_CHECK_EQUAL(this->transport->getState(), TransportState::UP);
+
+  int nStateChanges = 0;
+  this->transport->afterStateChange.connect(
+    [this, &nStateChanges] (TransportState oldState, TransportState newState) {
+      switch (nStateChanges) {
+      case 0:
+        BOOST_CHECK_EQUAL(oldState, TransportState::UP);
+        BOOST_CHECK_EQUAL(newState, TransportState::FAILED);
+        break;
+      case 1:
+        BOOST_CHECK_EQUAL(oldState, TransportState::FAILED);
+        BOOST_CHECK_EQUAL(newState, TransportState::CLOSED);
+        break;
+      default:
+        BOOST_CHECK(false);
+      }
+      nStateChanges++;
+    });
+
+  this->remoteWrite(buf2, false); // this should fail
+
+  BOOST_CHECK_EQUAL(nStateChanges, 2);
+
+  BOOST_CHECK_EQUAL(this->transport->getCounters().nInPackets, 1);
+  BOOST_CHECK_EQUAL(this->transport->getCounters().nInBytes, buf1.size());
+  BOOST_CHECK_EQUAL(this->receivedPackets->size(), 1);
 }
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(Close, T, StreamTransportFixtures, T)
 {
   this->initialize();
 
-  this->transport->close();
-  BOOST_CHECK_EQUAL(this->transport->getState(), TransportState::CLOSING);
+  this->transport->afterStateChange.connectSingleShot([this] (TransportState oldState, TransportState newState) {
+    BOOST_CHECK_EQUAL(oldState, TransportState::UP);
+    BOOST_CHECK_EQUAL(newState, TransportState::CLOSING);
+  });
 
-  this->g_io.poll();
-  BOOST_CHECK_EQUAL(this->transport->getState(), TransportState::CLOSED);
+  this->transport->close();
+
+  this->transport->afterStateChange.connectSingleShot([this] (TransportState oldState, TransportState newState) {
+    BOOST_CHECK_EQUAL(oldState, TransportState::CLOSING);
+    BOOST_CHECK_EQUAL(newState, TransportState::CLOSED);
+    this->limitedIo.afterOp();
+  });
+
+  BOOST_REQUIRE_EQUAL(this->limitedIo.run(1, time::seconds(1)), LimitedIo::EXCEED_OPS);
 }
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(RemoteClose, T, StreamTransportFixtures, T)
@@ -158,8 +200,13 @@
   this->remoteSocket.close();
   BOOST_REQUIRE_EQUAL(this->limitedIo.run(1, time::seconds(1)), LimitedIo::EXCEED_OPS);
 
-  this->g_io.poll();
-  BOOST_CHECK_EQUAL(this->transport->getState(), TransportState::CLOSED);
+  this->transport->afterStateChange.connectSingleShot([this] (TransportState oldState, TransportState newState) {
+    BOOST_CHECK_EQUAL(oldState, TransportState::FAILED);
+    BOOST_CHECK_EQUAL(newState, TransportState::CLOSED);
+    this->limitedIo.afterOp();
+  });
+
+  BOOST_REQUIRE_EQUAL(this->limitedIo.run(1, time::seconds(1)), LimitedIo::EXCEED_OPS);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestStreamTransport
@@ -167,4 +214,4 @@
 
 } // namespace tests
 } // namespace face
-} // namespace nfd
\ No newline at end of file
+} // namespace nfd
