public void logPeerConnections() {
    final List<String> connStr = new ArrayList<>();
    for (final TestNode node : nodes) {
      for (final PeerConnection peer : node.network.getPeers()) {
        final String localString = node.shortId() + "@" + peer.getLocalAddress();
        final String peerString =
            shortId(peer.getPeerInfo().getNodeId()) + "@" + peer.getRemoteAddress();
        connStr.add("Connection: " + localString + " to " + peerString);
      }
    }
    LOG.info("TestNodeList Connections: {}", connStr);
  }
Logs the Peer connections for each node.
ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TestNodeList.java