public void assertNoNetworkDisconnections() {
    int errCnt = 0;
    final StringBuilder sb = new StringBuilder();
    for (final TestNode node : nodes) {
      for (final Map.Entry<PeerConnection, DisconnectReason> entry :
          node.disconnections.entrySet()) {
        final PeerConnection peer = entry.getKey();
        final String peerString = peer.getPeerInfo().getNodeId() + "@" + peer.getRemoteAddress();
        final String unsentTxMsg =
            "Node "
                + node.shortId()
                + " has received a disconnection from "
                + peerString
                + " for "
                + entry.getValue()
                + "\n";
        sb.append(unsentTxMsg);
        errCnt++;
      }
    }
    final String header = "Nodes have received " + errCnt + " disconnections.\n";
    assertThat(errCnt).describedAs(header + sb).isEqualTo(0);
  }
Assert that there were no node disconnections reported from the P2P network
ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TestNodeList.java